You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fwiw, I think that FluidForce part of the example is a bad example and one we do not want anyone to use. So someone should consider a better mechanism for showing the .getInstance part of our embedding API.
This is not technically a bug because in Ruby 2.x 'def' will now return a Symbol of the method being added. Prior to Ruby 2, def would return nil. So in this example in JRuby 1.7.x we get back 'null' which is passed to getInstance which then uses self so the example works. In JRuby 9.1.x we get back :getFluidForce and then try to use the symbol to get an instance of the FluidForce interface (which of course a symbol does not implement that interface). So embedding API is working as expected but new Ruby semantics broke the example.
II will update the documentation to better illustrate what is happening (add self at bottom of fluid_force.rb) but I find this example to be a bit confusing with .getInstance.
Environment
Provide at least:
Other relevant info you may wish to add:
Expected Behavior
Running JRuby embed example on how to cast JRuby code to java interface should work as described.
Actual Behavior
Running the example with JRuby 9.1.8.0 throws an exception
Using JRuby 1.7.26 works fine.
Runnable example can be found here https://github.com/botchniaque/embed-jruby-test
The text was updated successfully, but these errors were encountered: