aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 33faed0057..6c4560f749 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -447,7 +447,7 @@ class OptionParser
(sopts+lopts).each do |opt|
# "(-x -c -r)-l[left justify]" \
- if opt =~ /^--\[no-\](.+)$/
+ if /^--\[no-\](.+)$/ =~ opt
o = $1
yield("--#{o}", desc.join(""))
yield("--no-#{o}", desc.join(""))