summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-24 11:37:35 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-24 11:37:35 +0100
commit07edf4976478e131431ffbf2f9637678422be875 (patch)
tree2a99a943c366125e2ed26f0f8d436af640b14d22 /pp_ctl.c
parentecf7aef391b44da4aba0d625608fbc4d07c5696e (diff)
downloadperl-07edf4976478e131431ffbf2f9637678422be875.tar.gz
Make []~~\&f and {}~~\&f match
(Zefram remarks that all(empty set) is true)
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 89088509a3..a8a36101de 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -4072,7 +4072,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
HV *hv = (HV*) SvRV(d);
I32 numkeys = hv_iterinit(hv);
if (numkeys == 0)
- RETPUSHNO;
+ RETPUSHYES;
while ( (he = hv_iternext(hv)) ) {
ENTER;
SAVETMPS;
@@ -4100,7 +4100,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
AV *av = (AV*) SvRV(d);
const I32 len = av_len(av);
if (len == -1)
- RETPUSHNO;
+ RETPUSHYES;
for (i = 0; i <= len; ++i) {
SV * const * const svp = av_fetch(av, i, FALSE);
ENTER;