`private` and `private :foo` have different semantics when compiling to Java #4469
Comments
I get an error while attempting to compile the second version as well. Shouldn't it compile to something equivalent to public class Foo {
private RubyObject isFoo() {
return true;
}
} in both scenarios? I feel like the |
@snood1205 I don't think so — I don't think there's any reason for a private Ruby method to be exposed to Java at all. |
@alyssais you would need to look at the internals to understand why its compiling everything - basically the
that is a convention when making Java methods accessible in Ruby, this is something else (no JI involved). |
looked into and realized I did not know about
|
Environment
Expected Behavior
should be compiled with
jrubyc --java
to the same Java as(The
foo?
method should not be generated in Java.)Actual Behavior
JRuby tries to compile the first example's
foo?
method to Java, which fails because -?
methods aren't supported in Java.The text was updated successfully, but these errors were encountered: