This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
s///: return boolean in not-in-place branch
authorDavid Mitchell <davem@iabyn.com>
Tue, 19 Dec 2017 12:09:15 +0000 (12:09 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 19 Dec 2017 15:15:02 +0000 (15:15 +0000)
commitc352ee5f96ca31651e1bac4e2f72702d961e700c
treeca81913637928c3b6a49c301b8ea5469a926a673
parent159675014fd98cba9a4bb64961c8cec02dfec87d
s///: return boolean in not-in-place branch

A while back, s/// (and other ops) were optimised to return
PL_sv_yes/PL_sv_zero rather than an iteration count in boolean context.

This optimisation was missed in one place in pp_subst(): the 'can modify
in place' branch was done, but the other branch was missed.

This commit fixes that.
pp_hot.c