diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-17 15:35:09 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-17 15:35:09 +0000 |
commit | 583a4b1774a9458585fe896b7756e5e3e39beb32 (patch) | |
tree | 34e47ea0718d9fccf2621ea3a67a18028de2bfba /test/ruby/test_regexp.rb | |
parent | adc639bb263ad411c0081b2d786865186c31ec2c (diff) |
* re.c (rb_reg_regsub): don't repeat repl twice with
"X".sub!(/./, sprintf("\\%c", 255)).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r-- | test/ruby/test_regexp.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 813ade7149..1f96a28b43 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -407,7 +407,7 @@ class TestRegexp < Test::Unit::TestCase assert_equal("fooXXXbaz", "foobarbaz".sub!(/bar/, "XXX")) s = [0xff].pack("C") assert_equal(s, "X".sub!(/./, s)) - assert_equal('\\' + s + '\\' + s, "X".sub!(/./, '\\' + s)) # ??? + assert_equal('\\' + s, "X".sub!(/./, '\\' + s)) assert_equal('\k', "foo".sub!(/.../, '\k')) assert_raise(RuntimeError) { "foo".sub!(/(?<x>o)/, '\k<x') } assert_equal('foo[bar]baz', "foobarbaz".sub!(/(b..)/, '[\0]')) |