summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-12-17 15:15:03 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-12-17 15:15:03 +0000
commit6c509658f8052f1ef9dba8ed5db2207e6375665e (patch)
tree51a2634154b95b96c3362aaa96b801280adb3eff /lib
parentcacbe70cd07487716de8401cc4e2ac399f19d537 (diff)
downloadslop-6c509658f8052f1ef9dba8ed5db2207e6375665e.tar.gz
Remind myself why I did this
Diffstat (limited to 'lib')
-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