summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 19:47:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-01 19:47:36 +0000
commit8b3813f6b0edc7d1355ba50e4535b7930ae1db6b (patch)
treeea4fbff6ca459939bf144793c9db97801b3dbe9e /ext/strscan/strscan.c
parent4d63c8503100b3683ea4eee14a39bbdee3d04c20 (diff)
strscan.c: fix condition
* ext/strscan/strscan.c (strscan_init_copy): fix inverted condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;