1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

optparse.rb: regexp at lhs

* lib/optparse.rb (OptionParser::Switch#compsys): regexp literal
  should be lhs of =~.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-11-28 07:34:15 +00:00
parent 21f81885ab
commit c26bc976bd

View file

@ -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(""))