Skip to content

Commit 9a83034

Browse files
committed
Use instanceof for WrappedIRClosure here since next line is a cast to WrappedIRClosure. It also reduces OperandType to be used only for persistence
1 parent dd69e08 commit 9a83034

File tree

1 file changed

+1
-1
lines changed
  • core/src/main/java/org/jruby/ir/representations

1 file changed

+1
-1
lines changed

core/src/main/java/org/jruby/ir/representations/CFG.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ public void removeBB(BasicBlock b) {
514514
private void removeNestedScopesFromBB(BasicBlock bb) {
515515
for (Instr instr: bb.getInstrs()) {
516516
for (Operand oper: instr.getOperands()) {
517-
if (oper.getOperandType() == OperandType.WRAPPED_IR_CLOSURE) {
517+
if (oper instanceof WrappedIRClosure) {
518518
WrappedIRClosure closure = (WrappedIRClosure) oper;
519519

520520
scope.removeClosure(closure.getClosure());

0 commit comments

Comments
 (0)