summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index b499fa2674..7af14c8ef2 100644
--- a/string.c
+++ b/string.c
@@ -3239,7 +3239,7 @@ 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)) {
+ if (!RREGEXP_PTR(sub) || RREGEXP_SRC_LEN(sub)) {
pos = rb_reg_search(sub, str, pos, 1);
pos = rb_str_sublen(str, pos);
}