summaryrefslogtreecommitdiff
path: root/lib/slop/parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/slop/parser.rb')
-rw-r--r--lib/slop/parser.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/slop/parser.rb b/lib/slop/parser.rb
index 3a828a0..a46858e 100644
--- a/lib/slop/parser.rb
+++ b/lib/slop/parser.rb
@@ -74,7 +74,8 @@ module Slop
if option = matching_option(flag)
process(option, arg)
elsif flag =~ /\A-[^-]/ && flag.size > 2
- # try and process as a set of grouped short flags
+ # try and process as a set of grouped short flags. drop(1) removes
+ # the prefixed -, then we add them back to each flag separately.
flags = flag.split("").drop(1).map { |f| "-#{f}" }
last = flags.pop