diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-26 07:13:53 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-26 07:13:53 +0000 |
commit | f7e94df0d66aff47745d189ab5a7858a92233d57 (patch) | |
tree | c332ba2a435a669f26b3c5b71c91a4c756547f79 /lib/rubygems/command.rb | |
parent | 0edc36b9f25e7b92c40d91858dfe4ef2bd06f796 (diff) |
lib/rubygems: explicitly clarify the type for =~ matching
RubyGems is very indifferent for type.
This change is needed for removal of `Object#=~`. [Feature #15231]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r-- | lib/rubygems/command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb index 1326da3961..5b8868b0cd 100644 --- a/lib/rubygems/command.rb +++ b/lib/rubygems/command.rb @@ -361,7 +361,7 @@ class Gem::Command def remove_option(name) @option_groups.each do |_, option_list| - option_list.reject! { |args, _| args.any? { |x| x =~ /^#{name}/ } } + option_list.reject! { |args, _| args.any? { |x| x.is_a?(String) && x =~ /^#{name}/ } } end end |