Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -34,11 +34,9 @@ public Object execute(VirtualFrame frame) {
if (nullProfile.profile(block == null)) {
return valueIfAbsent;
} else {
if (unusualShapeProfile.profile(block.getShape() != getContext().getCoreLibrary().getProcFactory().getShape())) {
if (!Layouts.PROC.isProc(block)) {
CompilerDirectives.transferToInterpreter();
throw new UnsupportedOperationException("Method passed something that isn't a Proc as a block");
}
if (!Layouts.PROC.isProc(block)) {
CompilerDirectives.transferToInterpreter();
throw new UnsupportedOperationException("Method passed something that isn't a Proc as a block");
}

return block;

0 comments on commit db97829

Please sign in to comment.