summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_ctl.c1
-rwxr-xr-xt/op/range.t4
2 files changed, 2 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 585c5bacb6..038129feaa 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 dcf0fcf8a5..ce9bbf675b 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";