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:
parent
21f81885ab
commit
c26bc976bd
1 changed files with 1 additions and 1 deletions
|
@ -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(""))
|
||||
|
|
Loading…
Reference in a new issue