summaryrefslogtreecommitdiff
path: root/perlapi.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2018-07-14 10:47:04 +0100
committerDavid Mitchell <davem@iabyn.com>2018-07-14 10:59:25 +0100
commit6b877bbd2c071b3e0659fab552a74dc2ff7e08fb (patch)
tree0104ca516d1cd6b7df0b1e94106e1b68224b103f /perlapi.h
parenta13f1de4e34633a275aa79d4e7874c2796bc0417 (diff)
downloadperl-6b877bbd2c071b3e0659fab552a74dc2ff7e08fb.tar.gz
treat when(index() > -1) as a boolean expression
RT #133368 when(X) is normally compiled as when($_ ~~ X) *except* when X appears to be a boolean expression, in which case it's used directly. 5.28.0 introduced an optimisation whereby comparisons involving index like index(...) != -1 eliminated the comparison, and pp_index() returned a boolean value directly. This defeated the 'look for a boolean op' mechanism, and so when(index(...) != -1) and similar were being incorrectly compiled as when($_ ~~ (index(...) != -1))
Diffstat (limited to 'perlapi.h')
0 files changed, 0 insertions, 0 deletions