Skip to content

Commit 9e2a3e4

Browse files
committed
Fix usage of Rope#toString in CoreExceptions#showExceptionIfDebug
1 parent 376e4d0 commit 9e2a3e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/truffleruby/core/exception/CoreExceptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public void showExceptionIfDebug(RubyClass rubyClass, Object message, Backtrace
9292
if (backtrace != null && backtrace.getStackTrace().length > 0) {
9393
from = " at " + debugBacktraceFormatter.formatLine(backtrace.getStackTrace(), 0, null);
9494
}
95+
if (RubyStringLibrary.getUncached().isRubyString(message)) {
96+
message = RubyStringLibrary.getUncached().getJavaString(message);
97+
}
9598
final String output = "Exception `" + exceptionClass + "'" + from + " - " + message + "\n";
9699
if (context.getCoreLibrary().isLoaded()) {
97100
RubyString outputString = StringOperations

0 commit comments

Comments
 (0)