From daa622aed079b4434e607820d7577b4a7d4f2bfc Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 29 Feb 2008 09:19:15 +0000 Subject: * time.c (time_strftime): format should be ascii compatible. * parse.y (rb_intern3): non ASCII compatible symbols. * re.c (rb_reg_regsub): add encoding check. * string.c (rb_str_chomp_bang): ditto. * test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 1 + 1 file changed, 1 insertion(+) (limited to 're.c') diff --git a/re.c b/re.c index 49424eb632..61f6990d04 100644 --- a/re.c +++ b/re.c @@ -2960,6 +2960,7 @@ 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); -- cgit v1.2.3