From: Father Chrysostomos Date: Wed, 6 Apr 2011 13:24:00 +0000 (-0700) Subject: [perl #87708] use integer; $tied > $tied X-Git-Tag: accepted/trunk/20130322.191538~4478 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd2dbd2b83d1a66966856f304534143330e0ef17;p=platform%2Fupstream%2Fperl.git [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 commit, get-magic would be called only once and the same value used. In 5.12.x the operands were swapped. --- diff --git a/pp.c b/pp.c index d572efc..df02e9c 100644 --- a/pp.c +++ b/pp.c @@ -2994,7 +2994,7 @@ PP(pp_i_gt) dVAR; dSP; tryAMAGICbin_MG(gt_amg, AMGf_set); { - dPOPTOPiirl_nomg; + dPOPTOPiirl_halfmg; SETs(boolSV(left > right)); RETURN; } diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index de9ec47..5629917 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -569,8 +569,8 @@ Use of uninitialized value $m1 in integer modulus (%) at - line 11. Use of uninitialized value $m2 in integer modulus (%) at - line 12. Use of uninitialized value $g1 in integer lt (<) at - line 13. Use of uninitialized value $m1 in integer lt (<) at - line 13. -Use of uninitialized value $g1 in integer gt (>) at - line 14. Use of uninitialized value $m1 in integer gt (>) at - line 14. +Use of uninitialized value $g1 in integer gt (>) at - line 14. Use of uninitialized value $m1 in integer le (<=) at - line 15. Use of uninitialized value $g1 in integer le (<=) at - line 15. Use of uninitialized value $m1 in integer ge (>=) at - line 16. diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t index e0a1208..cecfd7f 100644 --- a/t/op/tie_fetch_count.t +++ b/t/op/tie_fetch_count.t @@ -246,8 +246,8 @@ bin_test '.' , 1, 2, 12; { local $TODO; check_count '- under use integer', 2; } } bin_int_test '<' , 1, 2, 1; - bin_int_test '>' , 44, 2, 1; } +bin_int_test '>' , 44, 2, 1; bin_int_test '<=', 44, 2, ""; bin_int_test '>=', 1, 2, ""; bin_int_test '==', 1, 2, "";