ruby-changes:31812
From: nobu <ko1@a...>
Date: Thu, 28 Nov 2013 16:34:21 +0900 (JST)
Subject: [ruby-changes:31812] nobu:r43891 (trunk): optparse.rb: regexp at lhs
nobu 2013-11-28 16:34:15 +0900 (Thu, 28 Nov 2013) New Revision: 43891 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43891 Log: optparse.rb: regexp at lhs * lib/optparse.rb (OptionParser::Switch#compsys): regexp literal should be lhs of =~. Modified files: trunk/lib/optparse.rb Index: lib/optparse.rb =================================================================== --- lib/optparse.rb (revision 43890) +++ lib/optparse.rb (revision 43891) @@ -447,7 +447,7 @@ class OptionParser https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L447 (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("")) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/