aboutsummaryrefslogtreecommitdiffstats
path: root/lib/optparse.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-28 07:34:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-28 07:34:15 +0000
commitc26bc976bd3c02f9af7077919f0a2e7dd947e4d4 (patch)
treed08f3534f2c6ac42ad419570d0f3528cd8ecd46c /lib/optparse.rb
parent21f81885ab310f564fb60bfe7dcde816eeb11994 (diff)
downloadruby-c26bc976bd3c02f9af7077919f0a2e7dd947e4d4.tar.gz
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
Diffstat (limited to 'lib/optparse.rb')
-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(""))