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, 2 insertions, 0 deletions
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 9f935e6285..303f54a7d7 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -355,6 +355,8 @@ class Gem::Command
def add_option(*opts, &handler) # :yields: value, options
group_name = Symbol === opts.first ? opts.shift : :options
+ raise "Do not pass an empty string in opts" if opts.include?("")
+
@option_groups[group_name] << [opts, handler]
end