summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-19 01:21:22 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-19 01:21:22 +0000
commitf7e33566f09bd09e2a30db0e6835322b7f19bbd2 (patch)
treeb6b6487ea87c0ba6bb0412178e3b4b230590625b /pp_hot.c
parent7c1f0a780f6c3c384f7ab3ab896781a54a658b5f (diff)
downloadperl-f7e33566f09bd09e2a30db0e6835322b7f19bbd2.tar.gz
make failed matches return empty list in list context
p4raw-id: //depot/perl@1542
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4fe40cc01f..3ecb5b3e40 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -853,8 +853,6 @@ PP(pp_match)
}
}
}
- if (!rx->nparens && !global)
- gimme = G_SCALAR; /* accidental array context? */
safebase = (((gimme == G_ARRAY) || global || !rx->nparens)
&& !sawampersand);
safebase = safebase ? 0 : REXEC_COPY_STR ;
@@ -958,6 +956,8 @@ play_it_again:
PUTBACK; /* EVAL blocks may use stack */
goto play_it_again;
}
+ else if (!iters)
+ XPUSHs(&sv_yes);
LEAVE_SCOPE(oldsave);
RETURN;
}