Change 18074 by ams@lustre on 2002/10/30 22:30:32 Subject: Re: [perl #18114] [no subject] BUG: "-4\n".."0\n" is not DWIM but "-4\n".."-0\n" is! From: Slaven Rezic <[EMAIL PROTECTED]> Date: 30 Oct 2002 16:22:36 +0100 Message-Id: <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> Date: Wed, 30 Oct 2002 11:59:31 -0000 Message-Id: <71B318898201D311845C0008C75DAD1C07B78BF7@defra1ex2> (Applied over previous fix.)
Affected files ... .... //depot/perl/pp_ctl.c#326 edit .... //depot/perl/t/op/range.t#10 edit Differences ... ==== //depot/perl/pp_ctl.c#326 (text) ==== Index: perl/pp_ctl.c --- perl/pp_ctl.c#325~18073~ Wed Oct 30 11:47:12 2002 +++ perl/pp_ctl.c Wed Oct 30 14:30:32 2002 @@ -950,8 +950,7 @@ 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"); ==== //depot/perl/t/op/range.t#10 (xtext) ==== Index: perl/t/op/range.t --- perl/t/op/range.t#9~18073~ Wed Oct 30 11:47:12 2002 +++ perl/t/op/range.t Wed Oct 30 14:30:32 2002 @@ -75,5 +75,7 @@ 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"; End of Patch.