use ExtUtils::testlib;
use strict;
-BEGIN { print "1..14\n" };
+BEGIN { print "1..17\n" };
use threads;
use threads::shared;
ok(1,1,"loaded");
ok(14, 1, "lock on helems now work, this was bug 10045");
}
-
+{
+ my $object : shared = &share({});
+ threads->new(sub { bless $object, 'test1' });
+ ok(15, ref($object) eq 'test1', "blessing does work");
+ my %test = (object => $object);
+ ok(16, ref($test{object}) eq 'test1', "and some more work");
+ bless $object, 'test2';
+ ok(17, ref($test{object}) eq 'test2', "reblessing works!");
+}