Warning: ambiguous Java methods found (JRuby 1.7)

Just downloaded JRuby 1.7.0, and running unit tests on a Rails 3 project
I am see this warning, which I was not seeing with 1.6.7:

warning: ambiguous Java methods found

Okay, I get why it is happening, JRuby cannot be sure I am wanting
java.awt.Color.new(float, float, float) or java.awt.Color.new(double,
double, double), but then, who cares, they both do the same thing. Is
there a way to either turn off the warnings, or to explicitly tell JRuby
which one to use?

Check out java_send and java_alias in
https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby.

  • Keith

Keith R. Bennett
http://about.me/keithrbennett

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs