but "-4\n".."-0\n" is!
From: Slaven Rezic <slaven.rezic@berlin.de>
Date: 30 Oct 2002 16:22:36 +0100
Message-Id: <87n0ow0x4z.fsf@vran.herceg.de>
Subject: RE: [perl #18114] [no subject] [TEST PATCH]BUG: "-4\n".."0\n"
is not DWIM but "-4\n".."-0\n" is!
From: "Orton, Yves" <yves.orton@mciworldcom.de>
Date: Wed, 30 Oct 2002 11:59:31 -0000
Message-Id: <
71B318898201D311845C0008C75DAD1C07B78BF7@defra1ex2>
(Applied over previous fix.)
p4raw-id: //depot/perl@18074
if (SvNIOKp(left) || !SvPOKp(left) ||
SvNIOKp(right) || !SvPOKp(right) ||
(looks_like_number(left) && *SvPVX(left) != '0' &&
- looks_like_number(right) && (*SvPVX(right) != '0' ||
- SvCUR(right) == 1)))
+ looks_like_number(right)))
{
if (SvNV(left) < IV_MIN || SvNV(right) > IV_MAX)
DIE(aTHX_ "Range iterator outside integer range");
print "ok 15\n";
# [#18165] Should allow "-4".."0", broken by #4730. (AMS 20021031)
-print "not " unless 5 == (() = "-4".."0");
-print "ok 16\n";
+print join(":","-4".."0") eq "-4:-3:-2:-1:0" ? "ok 16\n" : "not ok 16\n";
+print join(":","-4".."-0") eq "-4:-3:-2:-1:0" ? "ok 17\n" : "not ok 17\n";
+print join(":","-4\n".."0\n") eq "-4:-3:-2:-1:0" ? "ok 18\n" : "not ok 18\n";
+print join(":","-4\n".."-0\n") eq "-4:-3:-2:-1:0" ? "ok 19\n" : "not ok 19\n";