Skip to content

Commit

Permalink
Use instanceof for WrappedIRClosure here since next line is a cast to…
Browse files Browse the repository at this point in the history
… WrappedIRClosure. It also reduces OperandType to be used only for persistence
  • Loading branch information
enebo committed Nov 4, 2014
1 parent dd69e08 commit 9a83034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/representations/CFG.java
Expand Up @@ -514,7 +514,7 @@ public void removeBB(BasicBlock b) {
private void removeNestedScopesFromBB(BasicBlock bb) {
for (Instr instr: bb.getInstrs()) {
for (Operand oper: instr.getOperands()) {
if (oper.getOperandType() == OperandType.WRAPPED_IR_CLOSURE) {
if (oper instanceof WrappedIRClosure) {
WrappedIRClosure closure = (WrappedIRClosure) oper;

scope.removeClosure(closure.getClosure());
Expand Down

0 comments on commit 9a83034

Please sign in to comment.