Skip to content

Commit 65e3eac

Browse files
committed
Don't rebless to the same type.
1 parent 8a6eb77 commit 65e3eac

File tree

1 file changed

+2
-1
lines changed
  • src/vm/jvm/runtime/org/perl6/nqp/runtime

1 file changed

+2
-1
lines changed

src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,8 @@ public static SixModelObject setwho(SixModelObject o, SixModelObject who) {
13431343
return o;
13441344
}
13451345
public static SixModelObject rebless(SixModelObject obj, SixModelObject newType, ThreadContext tc) {
1346-
obj.st.REPR.change_type(tc, obj, newType);
1346+
if (obj.st != newType.st)
1347+
obj.st.REPR.change_type(tc, obj, newType);
13471348
return obj;
13481349
}
13491350
public static SixModelObject create(SixModelObject obj, ThreadContext tc) {

0 commit comments

Comments
 (0)