Skip to content

Commit

Permalink
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -60,7 +60,16 @@ public Object execute(VirtualFrame frame) {
CompilerDirectives.transferToInterpreter();

if (AttachmentsManager.ATTACHMENT_SOURCE == source) {
final SourceSection sourceSection = (SourceSection) frame.getArguments()[0];
SourceSection sourceSection;
try {
sourceSection = (SourceSection) frame.getArguments()[0];
} catch (ClassCastException e) {
CompilerDirectives.transferToInterpreter();
for (Object arg : frame.getArguments()) {
System.out.println(arg.getClass() + " " + arg);
}
sourceSection = SourceSection.createUnavailable("attachment", "attachment");
}
final DynamicObject block = (DynamicObject) frame.getArguments()[1];

final RootNode rootNode = new AttachmentsManager.AttachmentRootNode(RubyLanguage.class, cachedContext, sourceSection, null, block);

0 comments on commit 6599fe8

Please sign in to comment.