We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Kernel#block_given?
1 parent 8d5d7e1 commit 9fc6b35Copy full SHA for 9fc6b35
src/main/java/org/truffleruby/core/kernel/KernelNodes.java
@@ -294,7 +294,7 @@ public boolean blockGiven(VirtualFrame frame,
294
@Cached("create(nil())") FindAndReadDeclarationVariableNode readNode,
295
@Cached("createBinaryProfile()") ConditionProfile blockProfile) {
296
MaterializedFrame callerFrame = callerFrameNode.execute(frame).materialize();
297
- return readNode.execute(callerFrame, TranslatorEnvironment.IMPLICIT_BLOCK_NAME) != nil();
+ return blockProfile.profile(readNode.execute(callerFrame, TranslatorEnvironment.IMPLICIT_BLOCK_NAME) != nil());
298
}
299
300
0 commit comments