summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/strscan/strscan.c')
-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 780cda0..eb36cec 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;