Skip to content

Commit

Permalink
Fixes #3545. java.lang.NullPointerException when using for loops
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Jan 19, 2017
1 parent a2f5752 commit 152cf90
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRScope.java
Expand Up @@ -328,7 +328,7 @@ public int getNearestModuleReferencingScopeDepth() {
if (current == null || current instanceof IREvalScript) return -1;

current = current.getLexicalParent();
n++;
if (!(current instanceof IRFor)) n++;
}

return n;
Expand Down
1 change: 0 additions & 1 deletion spec/regression/GH-3545_enclosing_scope_spec.rb
Expand Up @@ -15,7 +15,6 @@ def loop(dim1, dim2)
describe GH3545Loop do

it "GH-3545: should not raise retrieving current scope" do
pending 'FIXME: https://github.com/jruby/jruby/issues/3545'
expect { GH3545Loop.new.loop(2,2) }.not_to raise_exception
end

Expand Down

0 comments on commit 152cf90

Please sign in to comment.