diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-10 05:30:41 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-11 07:54:25 -0700 |
commit | 85b7d9b3f528e54538bc898015eba6bd0460c2d2 (patch) | |
tree | 54340283ffab1c2845648695b86a7be43d7227f2 /sv.c | |
parent | 48120f8fb3801512144143e22a9f264d9ceab915 (diff) | |
download | perl-85b7d9b3f528e54538bc898015eba6bd0460c2d2.tar.gz |
Fix booleanness of regexps
I broke this when I stopped regexps from being POK in 5.18.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3155,6 +3155,9 @@ Perl_sv_2bool_flags(pTHX_ SV *const sv, const I32 flags) } return SvRV(sv) != 0; } + if (isREGEXP(sv)) + return + RX_WRAPLEN(sv) > 1 || (RX_WRAPLEN(sv) && *RX_WRAPPED(sv) != '0'); return SvTRUE_common(sv, isGV_with_GP(sv) ? 1 : 0); } |