summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/re.c b/re.c
index d4e2bade70a..a955852d239 100644
--- a/re.c
+++ b/re.c
@@ -968,7 +968,9 @@ rb_reg_match_m(re, str)
VALUE result = rb_reg_match(re, str);
if (NIL_P(result)) return Qnil;
- return rb_backref_get();
+ result = rb_backref_get();
+ rb_match_busy(result);
+ return result;
}
static VALUE