diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -3083,10 +3083,8 @@ rb_str_rindex_m(int argc, VALUE *argv, VALUE str) pos = str_offset(RSTRING_PTR(str), RSTRING_END(str), pos, enc, single_byte_optimizable(str)); - if (!RREGEXP(sub)->ptr || RREGEXP_SRC_LEN(sub)) { - pos = rb_reg_search(sub, str, pos, 1); - pos = rb_str_sublen(str, pos); - } + pos = rb_reg_search(sub, str, pos, 1); + pos = rb_str_sublen(str, pos); if (pos >= 0) return LONG2NUM(pos); break; |