Skip to content

Commit 5ac6497

Browse files
committed
Small clenaup to InlinedBlockGivenNode.
1 parent 724eeb6 commit 5ac6497

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/truffleruby/core/inlined/InlinedBlockGivenNode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@
2222
public abstract class InlinedBlockGivenNode extends UnaryInlinedOperationNode {
2323

2424
protected static final String METHOD = "block_given?";
25-
@Child protected RubyNode readNode;
25+
26+
@Child protected RubyNode readMethodBlockNode;
2627

2728
public InlinedBlockGivenNode(RubyCallNodeParameters callNodeParameters, TranslatorEnvironment environment) {
2829
super(callNodeParameters);
29-
this.readNode = environment.findLocalVarOrNilNode(TranslatorEnvironment.METHOD_BLOCK_NAME, null);
30+
this.readMethodBlockNode = environment.findLocalVarOrNilNode(TranslatorEnvironment.METHOD_BLOCK_NAME, null);
3031
}
3132

3233
@Specialization(guards = {
3334
"lookupNode.lookup(frame, self, METHOD) == coreMethods().BLOCK_GIVEN",
3435
}, assumptions = "assumptions", limit = "1")
3536
boolean blockGiven(VirtualFrame frame, Object self,
3637
@Cached("createIgnoreVisibility()") LookupMethodNode lookupNode) {
37-
return readNode.execute(frame) != nil();
38+
return readMethodBlockNode.execute(frame) != nil();
3839
}
3940

4041
@Specialization

0 commit comments

Comments
 (0)