Skip to content

Commit 857723c

Browse files
committed
Last revert needed some more getName + context fixes
1 parent 1a96c95 commit 857723c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/main/java/org/jruby/BasicObjectStub.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public static RubyString convertToString(IRubyObject self) {
199199

200200
public static IRubyObject anyToString(IRubyObject self) {
201201
final RubyClass metaClass = getMetaClass(self);
202-
String cname = metaClass.getRealClass().getName();
202+
String cname = metaClass.getRealClass().getName(metaClass.getRuntime().getCurrentContext());
203203
/* 6:tags 16:addr 1:eos */
204204
return metaClass.runtime.newString("#<" + cname + ":0x" + Integer.toHexString(System.identityHashCode(self)) + '>');
205205
}

core/src/main/java/org/jruby/RubyBasicObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2926,7 +2926,7 @@ private void writeObject(ObjectOutputStream oos) throws IOException {
29262926
}
29272927

29282928
oos.defaultWriteObject();
2929-
oos.writeUTF(metaClass.getName());
2929+
oos.writeUTF(metaClass.getName(metaClass.getRuntime().getCurrentContext()));
29302930

29312931
metaClass.getVariableTableManager().serializeVariables(this, oos);
29322932
}

0 commit comments

Comments
 (0)