summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-05 22:30:16 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-04-06 06:09:27 -0700
commit4cdd48d8aacaf1f4775166dabd4fab9452b1e91a (patch)
treefcf9f9d7e2053b2b6460157786059da6c6a6997f /t
parentd4b629d054c4d4673eb40198700efd5b01407cb7 (diff)
downloadperl-4cdd48d8aacaf1f4775166dabd4fab9452b1e91a.tar.gz
[perl #87708] use integer; $tied <=> $tied
This is just part of #87708. This fixes <=> under ‘use integer’ when the same tied scalar is used for both operands and returns two different values. Before this com- mit, get-magic would be called only once and the same value used. In 5.12.x, the operands would be reversed.
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/9uninit2
-rw-r--r--t/op/tie_fetch_count.t2
2 files changed, 2 insertions, 2 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit
index 8cd4c3f35f..d42ec36d35 100644
--- a/t/lib/warnings/9uninit
+++ b/t/lib/warnings/9uninit
@@ -579,8 +579,8 @@ Use of uninitialized value $g1 in integer eq (==) at - line 17.
Use of uninitialized value $m1 in integer eq (==) at - line 17.
Use of uninitialized value $g1 in integer ne (!=) at - line 18.
Use of uninitialized value $m1 in integer ne (!=) at - line 18.
-Use of uninitialized value $g1 in integer comparison (<=>) at - line 19.
Use of uninitialized value $m1 in integer comparison (<=>) at - line 19.
+Use of uninitialized value $g1 in integer comparison (<=>) at - line 19.
Use of uninitialized value $m1 in integer negation (-) at - line 20.
########
use warnings 'uninitialized';
diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t
index a0e74913cc..7cbb8fd5af 100644
--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -251,8 +251,8 @@ bin_test '.' , 1, 2, 12;
bin_int_test '>=', 1, 2, "";
bin_int_test '==', 1, 2, "";
bin_int_test '!=', 1, 2, 1;
- bin_int_test '<=>', 1, 2, -1;
}
+bin_int_test '<=>', 1, 2, -1;
tie $var, "main", 1, 4;
cmp_ok(atan2($var, $var), '<', .3, 'retval of atan2 $var, $var');
check_count 'atan2', 2;