Hi,
using JRuby 1.5.1 I am getting in trouble because it seems that JRuby is
not aware of Java accessibility when determining method binding.
With the following Java program
package a;
public class A {
public void m(Object o) {
System.out.println(“Object”);
}
private void m(String s) {
System.out.println(“String”);
}
}
and the Ruby script
require ‘D:/…’
a = Java::A.new()
a.m(‘abc’)
the result is
String
where a Java call
A a = new A();
a.m(“abc”);
would evaluate to
Object
It seems that Ruby ignores the Java accessibility levels. From a general
point of view it might be seen as a feature but in my example above it
turns out to be a bug.
Is this behaviour intended or still a bug? I have not found any issues
in Jira according to this.
Cheers
Andreas
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email