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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/slop/parser.rb b/lib/slop/parser.rb
index 463e75a..27e1c50 100644
--- a/lib/slop/parser.rb
+++ b/lib/slop/parser.rb
@@ -53,8 +53,8 @@ module Slop
# support `foo=bar`
orig_flag = flag.dup
orig_arg = arg
- if flag.include?("=")
- flag, arg = flag.split("=")
+ if match = flag.match(/([^=]+)=([^=]+)/)
+ flag, arg = match.captures
end
if opt = try_process(flag, arg)