summaryrefslogtreecommitdiff
path: root/lib/rubygems/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/command.rb')
-rw-r--r--lib/rubygems/command.rb2
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