summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-22 04:31:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-22 04:31:24 +0000
commite689d077e30d4680af140be5549a369590e3db39 (patch)
treefe6bc16aecb02d55f2c8501d4840418566a2e8ea /lib/optparse.rb
parent9b3344c94d527d58886c5774f77d3cec01e472d1 (diff)
* lib/optparse.rb, lib/jcode.rb, ext/tk/lib/tk.rb: reorder character
class /[\]\[]/ to /[\[\]]/ to readability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 1da5ef2cc0..ea1ba61356 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -965,7 +965,7 @@ Default options, which never appear in option summary.
raise ArgumentError, "unsupported argument type: #{o}"
when *ArgumentStyle.keys
style = notwice(ArgumentStyle[o], style, 'style')
- when /^--no-([^\]\[=\s]*)(.+)?/
+ when /^--no-([^\[\]=\s]*)(.+)?/
q, a = $1, $2
o = notwice(a ? Object : TrueClass, klass, 'type')
not_pattern, not_conv = search(:atype, o) unless not_style
@@ -975,7 +975,7 @@ Default options, which never appear in option summary.
ldesc << "--no-#{q}"
long << 'no-' + (q = q.downcase)
nolong << q
- when /^--\[no-\]([^\]\[=\s]*)(.+)?/
+ when /^--\[no-\]([^\[\]=\s]*)(.+)?/
q, a = $1, $2
o = notwice(a ? Object : TrueClass, klass, 'type')
if a
@@ -987,7 +987,7 @@ Default options, which never appear in option summary.
not_pattern, not_conv = search(:atype, FalseClass) unless not_style
not_style = Switch::NoArgument
nolong << 'no-' + o
- when /^--([^\]\[=\s]*)(.+)?/
+ when /^--([^\[\]=\s]*)(.+)?/
q, a = $1, $2
if a
o = notwice(NilClass, klass, 'type')