From: Marcus Holland-Moritz Date: Tue, 9 Mar 2004 19:09:20 +0000 (+0000) Subject: Revert change #22472, but keep the new tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8819417e80aa9d32c750ac973516c321adba4cd;p=p5sagit%2Fp5-mst-13.2.git Revert change #22472, but keep the new tests. p4raw-link: @22472 on //depot/perl: 6b75d741eabd2f8d29b97270b6ce80b236b12a26 p4raw-id: //depot/perl@22473 --- diff --git a/pp_ctl.c b/pp_ctl.c index 585c5ba..038129f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1056,7 +1056,6 @@ PP(pp_flip) an exception for .."0" [#18165]). AMS 20021031. */ #define RANGE_IS_NUMERIC(left,right) ( \ - (!SvOK(left) && !SvOK(right)) || \ SvNIOKp(left) || (SvOK(left) && !SvPOKp(left)) || \ SvNIOKp(right) || (SvOK(right) && !SvPOKp(right)) || \ (((!SvOK(left) && SvOK(right)) || (looks_like_number(left) && \ diff --git a/t/op/range.t b/t/op/range.t index dcf0fcf..ce9bbf6 100755 --- a/t/op/range.t +++ b/t/op/range.t @@ -93,7 +93,7 @@ print join(":", map "[$_]", "B".."") eq '' ? "ok 26\n" : "not ok 26\n"; print join(":", map "[$_]", "B"..undef) eq '' ? "ok 27\n" : "not ok 27\n"; # undef..undef used to segfault -print join(":", map "[$_]", undef..undef) eq '[0]' ? "ok 28\n" : "not ok 28\n"; +print join(":", map "[$_]", undef..undef) eq '[]' ? "ok 28\n" : "not ok 28\n"; # also test undef in foreach loops @foo=(); push @foo, $_ for undef..2; @@ -121,4 +121,4 @@ print join(":", map "[$_]", @foo) eq '' ? "ok 35\n" : "not ok 35\n"; print join(":", map "[$_]", @foo) eq '' ? "ok 36\n" : "not ok 36\n"; @foo=(); push @foo, $_ for undef..undef; -print join(":", map "[$_]", @foo) eq '[0]' ? "ok 37\n" : "not ok 37\n"; +print join(":", map "[$_]", @foo) eq '[]' ? "ok 37\n" : "not ok 37\n";