1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

2000-02-08

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-02-08 08:54:01 +00:00
parent 25be6ce9b5
commit 320e99d8dd
33 changed files with 1157 additions and 516 deletions

View file

@ -161,7 +161,7 @@ class String
def tr_s!(from, to)
return self.delete!(from) if to.length == 0
pattern = SqueezePatternCache[from] ||= /([#{bsquote(from)}])\1+"/
pattern = SqueezePatternCache[from] ||= /([#{bsquote(from)}])\1+"/ #"
if from[0] == ?^
last = /.$/.match(to)[0]
self.gsub!(pattern, last)