summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-01-22 22:04:10 -0500
committerRicardo Signes <rjbs@cpan.org>2012-01-22 22:04:10 -0500
commitd676ba3d4e93f51782a425a31042dbe61a765e2c (patch)
tree1b4178d920af9d5023e917f0a14370001e100ab9
parent9a8aa25b28a859846cf1458bfe11f17ad258e982 (diff)
downloadperl-smoke-me/rjbs/smartmatch-prec.tar.gz
don't favor left operand's overload over right'ssmoke-me/rjbs/smartmatch-prec
-rw-r--r--pp_ctl.c2
-rw-r--r--t/op/smartmatch.t4
2 files changed, 2 insertions, 4 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 96c3972ec5..a99a78ec84 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4555,7 +4555,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other, const bool copied)
DEBUG_M(Perl_deb(aTHX_ " applying rule Any-Object\n"));
DEBUG_M(Perl_deb(aTHX_ " attempting overload\n"));
- tmpsv = amagic_call(d, e, smart_amg, 0);
+ tmpsv = amagic_call(d, e, smart_amg, AMGf_noleft);
if (tmpsv) {
SPAGAIN;
(void)POPs;
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index da4840eaca..79c9847fbf 100644
--- a/t/op/smartmatch.t
+++ b/t/op/smartmatch.t
@@ -73,7 +73,7 @@ my %keyandmore = map { $_ => 0 } @keyandmore;
my %fooormore = map { $_ => 0 } @fooormore;
# Load and run the tests
-plan tests => 351;
+plan tests => 349;
while (<DATA>) {
SKIP: {
@@ -223,8 +223,6 @@ __DATA__
@ "object" $str_obj
@ FALSE $str_obj
# Those will treat the $str_obj as a string because of fallback:
-! $ov_obj $str_obj
- $ov_obj_2 $str_obj
# object (overloaded or not) ~~ Any
$obj qr/NoOverload/