summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index ad9ba6f355..f989466d32 100644
--- a/string.c
+++ b/string.c
@@ -9046,6 +9046,7 @@ scan_once(VALUE str, VALUE pat, long *start, int set_backref_str)
else {
match = rb_backref_get();
regs = RMATCH_REGS(match);
+ pos = BEG(0);
end = END(0);
}
if (pos == end) {