Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
LoadError when loading a class with inline hash using instance vars as values. #5341
Same result experienced on Mac and Alpine Linux
Given the following script:
I expect jruby to load both the rb file and class:
However, when I change the function to return the instance vars:
the class does not load properly
Additionally, attempting to load the class with java results in a null pointer exception (this works fine with the first, working example using string literals as values):
I am able to execute this code using rspec and get appropriate results. This only affects the compiled java class. Not sure if there is anything needed from Warbler, but I am also using Warbler 2.0.5 to build the jar file. As shown above, the issue is clearly upstream from warbler, although I see the exact same behavior from the jar file.
This was referenced
Oct 2, 2018
Both of the cases you point out appear to work correctly on JRuby master, which may mean they're already fixed for 9.2.1. Can you test out a snapshot build and let us know if you still see the problem?