From e689d077e30d4680af140be5549a369590e3db39 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 22 Mar 2003 04:31:24 +0000 Subject: * 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 --- lib/optparse.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/optparse.rb') 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') -- cgit v1.2.3