Skip to content

Commit

Permalink
[Truffle] Small code clean-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Mar 9, 2015
1 parent 911ae8a commit d335b27
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -103,15 +103,15 @@ public RubyClass getSingletonClass(Node currentNode) {
}

final RubyClass logicalClass = metaClass;
RubyModule attached = null;

if (this instanceof RubyModule) {
metaClass = RubyClass.createSingletonClassOfObject(getContext(), logicalClass, (RubyModule) this,
String.format("#<Class:#<%s:0x%x>>", logicalClass.getName(), getObjectID()));
} else {
metaClass = RubyClass.createSingletonClassOfObject(getContext(), logicalClass, null,
String.format("#<Class:#<%s:0x%x>>", logicalClass.getName(), getObjectID()));
attached = (RubyModule) this;
}

metaClass = RubyClass.createSingletonClassOfObject(getContext(), logicalClass, attached,
String.format("#<Class:#<%s:0x%x>>", logicalClass.getName(), getObjectID()));

if (DebugOperations.verySlowIsFrozen(this)) {
DebugOperations.verySlowFreeze(metaClass);
}
Expand Down

0 comments on commit d335b27

Please sign in to comment.