summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2008-01-14 14:56:48 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-15 11:11:07 +0000
commita2309040b8fe324ae09c064137c624b4292d93c1 (patch)
tree94472c2597f4c1ce4778668ea9af0743628a3a89 /pp_hot.c
parent3e946625bd318900adc25217434a05ce37064aba (diff)
downloadperl-a2309040b8fe324ae09c064137c624b4292d93c1.tar.gz
Fix range operator
From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510801141656i325ac69ev8a0af47f9fe72a1e@mail.gmail.com> p4raw-id: //depot/perl@32979
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 2cb394e8a6..ad9e0ea5fc 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1961,6 +1961,15 @@ PP(pp_iter)
*itersvp = newSViv(cx->blk_loop.iterix++);
SvREFCNT_dec(oldsv);
}
+
+ /* Handle end of range at IV_MAX */
+ if ((cx->blk_loop.iterix == IV_MIN) &&
+ (cx->blk_loop.itermax == IV_MAX))
+ {
+ cx->blk_loop.iterix++;
+ cx->blk_loop.itermax++;
+ }
+
RETPUSHYES;
}