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 | 199dcd6406a26a6b49b13cc27c634d798cd7d23b (patch) | |
| tree | 34e47ea0718d9fccf2621ea3a67a18028de2bfba /test/ruby | |
| parent | 1dd02660bcebd599ed481e86b4cdb59865da74a8 (diff) | |
| download | ruby-199dcd6406a26a6b49b13cc27c634d798cd7d23b.tar.gz ruby-199dcd6406a26a6b49b13cc27c634d798cd7d23b.tar.xz ruby-199dcd6406a26a6b49b13cc27c634d798cd7d23b.zip | |
* re.c (rb_reg_regsub): don't repeat repl twice with
"X".sub!(/./, sprintf("\\%c", 255)).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 813ade714..1f96a28b4 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]')) |
