summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/slop/parser.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/slop/parser.rb b/lib/slop/parser.rb
index 1bfa134..1e810d8 100644
--- a/lib/slop/parser.rb
+++ b/lib/slop/parser.rb
@@ -94,7 +94,7 @@ module Slop
process(option, arg)
elsif flag.start_with?("--no-") && option = matching_option(flag.sub("no-", ""))
process(option, false)
- elsif flag =~ /\A-[^-]/ && flag.size > 2
+ elsif flag =~ /\A-[^-]{2,}/
# 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}" }