summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/re.c b/re.c
index 5e73ddbd8b..d587cdbb5c 100644
--- a/re.c
+++ b/re.c
@@ -629,6 +629,7 @@ rb_reg_search(re, str, pos, reverse)
else {
range = RSTRING(str)->len - pos;
}
+ regs.allocated = 0;
result = re_search(RREGEXP(re)->ptr,RSTRING(str)->ptr,RSTRING(str)->len,
pos, range, &regs);