Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 549d65685e57ebefebbb7d8766e346fa2e33fc7d
https://github.com/Perl/perl5/commit/549d65685e57ebefebbb7d8766e346fa2e33fc7d
Author: David Mitchell <[email protected]>
Date: 2023-09-19 (Tue, 19 Sep 2023)
Changed paths:
M lib/overload.t
M pp_ctl.c
Log Message:
-----------
smartmatch: $obj ~~ $scalar: one item in list cxt
GH ##21477
My recent commit, v5.39.2-101-g987819ee34,
"make RC-stack-aware: unwrap startmatch [sic] and misc"
introduced a bug which broke Lingua::EN::Inflexion.
This was because the code path for handling overloaded objects of the
form ($obj ~~ $scalar) was re-pushing the original args onto the stack
before calling the overload method, which was unnecessary. This meant
that in list context, rather than returning the one-element list (Y/N),
it was returning the three-element list ($obj, $scalar, Y/N).
This commit fixes that.