diff options
author | David Mitchell <davem@iabyn.com> | 2017-11-28 09:08:09 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-11-28 09:23:57 +0000 |
commit | d7e75038064881b413f76de9315a5acfb21472f0 (patch) | |
tree | cab03635d72d7d1624a57406fb4192ea5b3df10d /pp_hot.c | |
parent | 04139aa0b51c7b5d9f80f77b10f85ce4c65a4cf6 (diff) | |
download | perl-d7e75038064881b413f76de9315a5acfb21472f0.tar.gz |
$overloaded .= $x: don't stringify $x
RT #132385
This is a variant of the ($ref . $overloaded) bug which was fixed with
v5.27.5-195-gb3ab0375cb.
Basically, when the overloaded concat method is called, it should pass
$x as-is, rather than as "$x". This fixes PDL-2.018
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -661,6 +661,19 @@ PP(pp_multiconcat) */ assert(!targ_chain); dsv = newSVpvn_flags("", 0, SVs_TEMP); + + if ( svpv_end == svpv_buf + 1 + /* no const string segments */ + && aux[PERL_MULTICONCAT_IX_LENGTHS].ssize == -1 + ) { + /* special case $overloaded .= $arg1: + * avoid stringifying $arg1. + * Similar to the $arg1 . $arg2 case in phase1 + */ + svpv_end--; + SP--; + } + goto phase3; } } |