This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In lib/File/stat.t, test everything with and without use filetest "access".
[perl5.git] / universal.c
index af3207f..384d307 100644 (file)
@@ -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;