summaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/string.c b/string.c
index ef54b7e45..d123207fd 100644
--- a/string.c
+++ b/string.c
@@ -5705,11 +5705,8 @@ rb_str_scan(VALUE str, VALUE pat)
}
while (!NIL_P(result = scan_once(str, pat, &start))) {
- match = rb_backref_get();
- rb_match_busy(match);
rb_yield(result);
str_mod_check(str, p, len);
- rb_backref_set(match); /* restore $~ value */
}
rb_backref_set(match);
return str;