Index: src/pmc/boolean.pmc =================================================================== --- src/pmc/boolean.pmc (revision 48997) +++ src/pmc/boolean.pmc (working copy) @@ -184,6 +184,29 @@ SELF.set_bool(VTABLE_shift_integer(INTERP, info)); } +/* + +=item C + +Temporary solution for backward compatibility until deprecation cycle. + +See TT #1790 + +=cut + +*/ + + VTABLE INTVAL isa(STRING *some) + { + if (Parrot_str_equal(INTERP, some, CONST_STRING(INTERP, "Boolean"))) + return 1; + if (Parrot_str_equal(INTERP, some, CONST_STRING(INTERP, "scalar"))) + return 1; + if (Parrot_str_equal(INTERP, some, CONST_STRING(INTERP, "Integer"))) + return 1; + return 0; + } + } /* Index: t/pmc/boolean.t =================================================================== --- t/pmc/boolean.t (revision 48997) +++ t/pmc/boolean.t (working copy) @@ -19,7 +19,7 @@ .sub main :main .include 'test_more.pir' - plan(31) + plan(32) init_null_tests() init_int_tests() instantiate_tests() @@ -207,6 +207,10 @@ .local int b p = new ['Boolean'] + + isa b, p, "Integer" + is(b, 1, "Boolean isa Integer - going to be deprecated - TT #1790") + does b, p, "scalar" is(b, 1, "Boolean does scalar") does b, p, "boolean"