mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
9b3344c94d
commit
e689d077e3
4 changed files with 18 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue