Skip to content

java.lang.NullPointerException when using for loops #3545

@vassilios

Description

@vassilios

I was trying to port some legacy code to jruby 9.0.4.0 when I came across this issue.

Attaching backtrace of exception.
The following repository should help you reproduce the problem.

https://github.com/vassilios/test_for_loop/tree/master

Running

bin/rspec --format doc

Fails with a null pointer exception.

Tested on ubuntu linux with jruby 9.0.4.0

$ uname -a
Linux ip-172-30-3-223 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ jruby -v
jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa OpenJDK 64-Bit Server VM 24.79-b02 on 1.7.0_79-b14 +jit [linux-amd64]

test_for_loop.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions