Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;

import org.jcodings.specific.UTF8Encoding;
import org.jruby.RubyString;
import org.jruby.truffle.nodes.RubyGuards;
@@ -137,7 +138,8 @@ public MessageNode(RubyContext context, SourceSection sourceSection) {

@Specialization
public Object message(DynamicObject exception) {
return Layouts.EXCEPTION.getMessage(exception);
final Object message = Layouts.EXCEPTION.getMessage(exception);
return message == null ? nil() : message;
}

}

0 comments on commit 554f1c0

Please sign in to comment.