diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-24 11:37:35 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-03-24 11:37:35 +0100 |
commit | 07edf4976478e131431ffbf2f9637678422be875 (patch) | |
tree | 2a99a943c366125e2ed26f0f8d436af640b14d22 /pp_ctl.c | |
parent | ecf7aef391b44da4aba0d625608fbc4d07c5696e (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |