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

* re.c (rb_reg_regsub): remove too strict encoding check.

[ruby-dev:33966]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2008-03-03 08:22:18 +00:00
parent 9b2dd1e20d
commit bbc2f80a32
3 changed files with 5 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Mon Mar 3 17:15:09 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (rb_reg_regsub): remove too strict encoding check.
[ruby-dev:33966]
Mon Mar 3 16:14:24 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (rb_any_hash): shrinks all results in Fixnum range.

1
re.c
View file

@ -2960,7 +2960,6 @@ rb_reg_regsub(VALUE str, VALUE src, struct re_registers *regs, VALUE regexp)
rb_encoding *str_enc = rb_enc_get(str);
rb_encoding *src_enc = rb_enc_get(src);
rb_enc_check(str, src);
p = s = RSTRING_PTR(str);
e = s + RSTRING_LEN(str);

View file

@ -1417,7 +1417,6 @@ class TestM17NComb < Test::Unit::TestCase
assert_equal(s1, doit.call)
next
end
assert(false, "test broken")
if !str_enc_compatible?(s1.gsub(r2, ''), s3)
assert_raise(ArgumentError, desc) { doit.call }
next
@ -1472,7 +1471,6 @@ class TestM17NComb < Test::Unit::TestCase
assert_equal([s1, nil], doit.call)
next
end
assert(false, "test broken")
if !str_enc_compatible?(s1.gsub(r2, ''), s3)
assert_raise(ArgumentError, desc) { doit.call }
next