From: Yuval Kogman <nothingmuch@woobling.org>
Date: Thu, 21 Aug 2008 10:43:55 +0000 (+0000)
Subject: blah, RegexpRef and Object tests were reversed
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bafbdb488f1cd0d0c634ba97ebe3109ee7dff88e;p=gitmo%2FMoose.git

blah, RegexpRef and Object tests were reversed
---

diff --git a/Moose.xs b/Moose.xs
index 9427ba2..da8ff33 100644
--- 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;