diff options
author | Samuel Giddins <[email protected]> | 2023-01-25 17:08:14 -0800 |
---|---|---|
committer | git <[email protected]> | 2023-02-22 08:42:15 +0000 |
commit | cbe14cc8e6ff7da4ec6d2a3ea9de139cb6dcedbf (patch) | |
tree | 4315b73fa1de35a82f20b51f1fe792586dd917a6 /lib/rubygems/command.rb | |
parent | 693e4dec236e14432df97010082917a3a48745cb (diff) |
[rubygems/rubygems] Add gem exec command
https://github.com/rubygems/rubygems/commit/ca69a317f3
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r-- | lib/rubygems/command.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb index 59bfc5a118..1e15f612de 100644 --- a/lib/rubygems/command.rb +++ b/lib/rubygems/command.rb @@ -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 |