[rubygems/rubygems] Add gem exec command

ca69a317f3
This commit is contained in:
Samuel Giddins 2023-01-25 17:08:14 -08:00 committed by git
parent 693e4dec23
commit cbe14cc8e6
3 changed files with 196 additions and 5 deletions

View file

@ -201,11 +201,15 @@ class Gem::Command
# respectively.
def get_all_gem_names_and_versions
get_all_gem_names.map do |name|
if /\A(.*):(#{Gem::Requirement::PATTERN_RAW})\z/ =~ name
[$1, $2]
else
[name]
end
extract_gem_name_and_version(name)
end
end
def extract_gem_name_and_version(name) # :nodoc:
if /\A(.*):(#{Gem::Requirement::PATTERN_RAW})\z/ =~ name
[$1, $2]
else
[name]
end
end