summaryrefslogtreecommitdiffstats
path: root/lib
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
commit0df96f14258e9783a63e0ab44aaacd03ee816745 (patch)
treefe6bc16aecb02d55f2c8501d4840418566a2e8ea /lib
parentdd78182dd079af74d28e078aef3825741814eeb4 (diff)
downloadruby-0df96f14258e9783a63e0ab44aaacd03ee816745.tar.gz
ruby-0df96f14258e9783a63e0ab44aaacd03ee816745.tar.xz
ruby-0df96f14258e9783a63e0ab44aaacd03ee816745.zip
* lib/optparse.rb, lib/jcode.rb, ext/tk/lib/tk.rb: reorder character
class /[\]\[]/ to /[\[\]]/ to readability. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/jcode.rb2
-rw-r--r--lib/optparse.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/jcode.rb b/lib/jcode.rb
index df2cd61b3..1e8fd6451 100644
--- a/lib/jcode.rb
+++ b/lib/jcode.rb
@@ -9,7 +9,7 @@ class String
printf STDERR, "feel free for some warnings:\n" if $VERBOSE
def _regex_quote(str)
- str.gsub(/(\\[\]\[\-\\])|\\(.)|([\]\[\\])/) do
+ str.gsub(/(\\[\[\]\-\\])|\\(.)|([\[\]\\])/) do
$1 || $2 || '\\' + $3
end
end
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 1da5ef2cc..ea1ba6135 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')