summaryrefslogtreecommitdiff
path: root/ext/strscan
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-31 02:43:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-31 02:43:17 +0000
commit5757a872c44cfb0a3abf1eb38e5871fa0af09a4f (patch)
tree8e78726ce23bd5d674a1548b115af2994754aa91 /ext/strscan
parentd9c5f88abc3377351d2bb8d065113dd0f1eba205 (diff)
* ext/strscan/strscan.c (strscan_do_scan): fix usecnt decrement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan')
-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 6f05ec3..6b0d8e7 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -431,7 +431,7 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
(UChar* )CURPTR(p), (UChar* )(CURPTR(p) + S_RESTLEN(p)),
&(p->regs), ONIG_OPTION_NONE);
}
- if (!tmpreg) RREGEXP(re)->usecnt--;
+ if (!tmpreg) RREGEXP(regex)->usecnt--;
if (tmpreg) {
if (RREGEXP(regex)->usecnt) {
onig_free(re);