summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/strscan/strscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 780cda08b1f..eb36cecc47d 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -252,7 +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();
+ if (!self->regs.allocated) rb_memerror();
}
return vself;