Change 19841 by [EMAIL PROTECTED] on 2003/06/22 16:35:33

        Subject: [PATCH] Re: Is it a Bug? ($c .= "5") . "6"
        From: Enache Adrian <[EMAIL PROTECTED]>
        Date: Sat, 21 Jun 2003 03:19:31 +0300
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/op.c#574 edit
... //depot/perl/t/op/concat.t#5 edit

Differences ...

==== //depot/perl/op.c#574 (text) ====
Index: perl/op.c
--- perl/op.c#573~19739~        Tue Jun 10 22:30:53 2003
+++ perl/op.c   Sun Jun 22 09:35:33 2003
@@ -4701,8 +4701,9 @@
 OP *
 Perl_ck_concat(pTHX_ OP *o)
 {
-    if (cUNOPo->op_first->op_type == OP_CONCAT)
-       o->op_flags |= OPf_STACKED;
+    OP *kid = cUNOPo->op_first;
+    if (kid->op_type == OP_CONCAT && !(kUNOP->op_first->op_flags & OPf_MOD))
+        o->op_flags |= OPf_STACKED;
     return o;
 }
 

==== //depot/perl/t/op/concat.t#5 (text) ====
Index: perl/t/op/concat.t
--- perl/t/op/concat.t#4~18764~ Mon Feb 24 10:44:41 2003
+++ perl/t/op/concat.t  Sun Jun 22 09:35:33 2003
@@ -18,7 +18,7 @@
     return $ok;
 }
 
-print "1..18\n";
+print "1..19\n";
 
 ($a, $b, $c) = qw(foo bar);
 
@@ -103,4 +103,9 @@
     ok(beq($l.$r, $c), "concat byte and utf8");
     ok(beq($l, "\x{fe}"), "right not changed after concat b+u");
     ok(beq($r, "\x{101}"), "left not changed after concat b+u");
+}
+
+{
+    my $a; ($a .= 5) . 6;
+    ok($a == 5, "($a .= 5) . 6 - present since 5.000");
 }
End of Patch.

Reply via email to