diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-05-24 20:37:01 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-07 08:18:51 -0700 |
commit | cee59a6aac1243619d4052d0291981c8f2a9966d (patch) | |
tree | b7cc78a6b4a245f142d8edb24f89745baa95dfef /universal.c | |
parent | 44b7e78a9416df5de92da12988790f8e11c1b6f4 (diff) | |
download | perl-cee59a6aac1243619d4052d0291981c8f2a9966d.tar.gz |
Make UNIVERSAL::can treats str and num the same way
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/universal.c b/universal.c index af3207fd33..384d3071fc 100644 --- a/universal.c +++ b/universal.c @@ -356,8 +356,8 @@ XS(XS_UNIVERSAL_can) SvGETMAGIC(sv); - if (!SvOK(sv) || !(SvROK(sv) || (SvPOK(sv) && SvCUR(sv)) - || (SvGMAGICAL(sv) && SvPOKp(sv) && SvCUR(sv)))) + if (!SvOK(sv) || !(SvROK(sv) || SvNIOK(sv) || (SvPOK(sv) && SvCUR(sv)) + || (SvGMAGICAL(sv) && (SvNIOKp(sv) || (SvPOKp(sv) && SvCUR(sv)))))) XSRETURN_UNDEF; rv = &PL_sv_undef; |