Skip to content

Commit

Permalink
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -339,8 +339,6 @@ public BlockGivenNode(BlockGivenNode prev) {

@Specialization
public boolean blockGiven() {
notDesignedForCompilation();

return RubyArguments.getBlock(Truffle.getRuntime().getCallerFrame().getFrame(FrameInstance.FrameAccess.READ_ONLY, false).getArguments()) != null;
}
}
Original file line number Diff line number Diff line change
@@ -28,8 +28,6 @@ public RubiniusSingleBlockArgNode(RubyContext context, SourceSection sourceSecti

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

/**
* This is our implementation of Rubinius.single_block_arg.
*
@@ -52,7 +50,7 @@ public Object execute(VirtualFrame frame) {
} else {
Object[] extractedArguments = RubyArguments.extractUserArguments(frame.getArguments());

return RubyArray.fromObjects(getContext().getCoreLibrary().getArrayClass(), extractedArguments);
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), extractedArguments, userArgumentCount);
}
}
}

0 comments on commit 0e46662

Please sign in to comment.