Skip to content

Commit 9fc6b35

Browse files
committed
Profile the result of Kernel#block_given?.
1 parent 8d5d7e1 commit 9fc6b35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/truffleruby/core/kernel/KernelNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public boolean blockGiven(VirtualFrame frame,
294294
@Cached("create(nil())") FindAndReadDeclarationVariableNode readNode,
295295
@Cached("createBinaryProfile()") ConditionProfile blockProfile) {
296296
MaterializedFrame callerFrame = callerFrameNode.execute(frame).materialize();
297-
return readNode.execute(callerFrame, TranslatorEnvironment.IMPLICIT_BLOCK_NAME) != nil();
297+
return blockProfile.profile(readNode.execute(callerFrame, TranslatorEnvironment.IMPLICIT_BLOCK_NAME) != nil());
298298
}
299299
}
300300

0 commit comments

Comments
 (0)