From 2ba22d68519872b18a3b61490b6b78e2a7aca013 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 16 Oct 2008 22:21:42 +0000 Subject: * .gdbinit (rp): REGEXP handling fixed. * string.c (rb_str_rindex_m): need not to call rb_enc_check on regexp. * re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for broken strings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 859363363..601845c44 100644 --- a/string.c +++ b/string.c @@ -2355,7 +2355,7 @@ rb_str_rindex_m(int argc, VALUE *argv, VALUE str) case T_REGEXP: /* enc = rb_get_check(str, sub); */ pos = str_offset(RSTRING_PTR(str), RSTRING_END(str), pos, - rb_enc_check(str, sub), single_byte_optimizable(str)); + STR_ENC_GET(str), single_byte_optimizable(str)); if (!RREGEXP(sub)->ptr || RREGEXP_SRC_LEN(sub)) { pos = rb_reg_adjust_startpos(sub, str, pos, 1); -- cgit