Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ public class ReadBlockNode extends RubyNode {

private final Object valueIfAbsent;

private final ConditionProfile hasBlockProfile = ConditionProfile.createBinaryProfile();
private final ConditionProfile blockProfile = ConditionProfile.createBinaryProfile();

public ReadBlockNode(RubyContext context, SourceSection sourceSection, Object valueIfAbsent) {
super(context, sourceSection);
@@ -31,7 +31,7 @@ public ReadBlockNode(RubyContext context, SourceSection sourceSection, Object va
public Object execute(VirtualFrame frame) {
final DynamicObject block = RubyArguments.getBlock(frame);

if (hasBlockProfile.profile(block == null)) {
if (blockProfile.profile(block == null)) {
return valueIfAbsent;
} else {
return block;
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@

public class ReadCallerFrameNode extends RubyNode {

private final ConditionProfile hasCallerFrameProfile = ConditionProfile.createBinaryProfile();
private final ConditionProfile callerFrameProfile = ConditionProfile.createBinaryProfile();

public ReadCallerFrameNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -28,7 +28,7 @@ public ReadCallerFrameNode(RubyContext context, SourceSection sourceSection) {
public Object execute(VirtualFrame frame) {
final Object callerFrame = RubyArguments.getCallerFrame(frame);

if (hasCallerFrameProfile.profile(callerFrame == null)) {
if (callerFrameProfile.profile(callerFrame == null)) {
return NotProvided.INSTANCE;
} else {
return callerFrame;

0 comments on commit 5c187a3

Please sign in to comment.