blah, RegexpRef and Object tests were reversed
Yuval Kogman [Thu, 21 Aug 2008 10:43:55 +0000 (10:43 +0000)]
Moose.xs

index 9427ba2..da8ff33 100644 (file)
--- a/Moose.xs
+++ b/Moose.xs
@@ -469,7 +469,7 @@ STATIC bool check_sv_type (TC type, SV *sv) {
             if ( sv_isobject(sv) ) {
                 char *name = HvNAME_get(SvSTASH(SvRV(sv)));
                 bool is_regexp = strEQ("Regexp", name);
-                return ( type != RegexpRef ? is_regexp : !is_regexp );
+                return ( type == RegexpRef ? is_regexp : !is_regexp );
             }
             return 0;
             break;