diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/strscan/strscan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index acb7c61230..780cda08b1 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -252,6 +252,7 @@ strscan_init_copy(VALUE vself, VALUE vorig) self->prev = orig->prev; self->curr = orig->curr; onig_region_copy(&self->regs, &orig->regs); + if (self->regs.allocated) rb_memerror(); } return vself; |