Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.8
-
Fix Version/s: JRuby 0.9.9
-
Component/s: Java Integration
-
Labels:None
-
Environment:Mac OS X 1.4, Java 5. Maybe All environments....
-
Number of attachments :
Description
-
-
-
-
-
-
-
-
-
-
-
- JAVA CODE **********
public class MyClass {
public void open() { System.out.println("open()"); }
- JAVA CODE **********
-
-
-
-
-
-
-
-
-
-
public boolean isOpen() {
System.out.println("isOpen()");
return false;
}
}
-
-
-
-
-
-
-
-
-
- JRUBY CODE ***********
require 'java'
include_class 'MyClass'
mine = MyClass.new
- JRUBY CODE ***********
-
-
-
-
-
-
-
-
mine.open
mine.is_open
mine.open?
-
-
-
-
-
-
-
-
-
- OUTPUT *****************
isOpen()
isOpen()
isOpen()
- OUTPUT *****************
-
-
-
-
-
-
-
-
The MyClass.open() method seems to be lost.
Attachments
Issue Links
| This issue relates to: | ||||
| JRUBY-45 | Java class with initialize() method can't be constructed from jruby |
|
|
|
| JRUBY-664 | Can't call a final method in Java base class |
|
|
|
| JRUBY-195 | method dispatch on Java objects / classes should try to find a matching varargs method |
|
|
|
| This issue supercedes: | ||||
| JRUBY-778 | basic Swing usage causes SystemStackError |
|
|
|
| JRUBY-73 | problem when field and method with same name |
|
|
|
| JRUBY-29 | Included Java classes will overwrite Ruby proxy methods or existing Ruby methods |
|
|
|
| JRUBY-574 | kind_of? and < do not work properly for Java classes |
|
|
|
| JRUBY-780 | JavaUtilities.extend_proxy methods that call super() can't find super's method if it is implemented in an ancestor's class |
|
|
|
| JRUBY-263 | Accessing static properties should work like access to nonstatic properties |
|
|
|
The paste seemed to get lost, but we understand the issue. This needs to be fixed for 1.0, and basically involves setting the following priorities:
1. Ruby methods crucial to Ruby behavior must not be overwritten (like "class")
2. actual Java method names must exist for Ruby code
3. camel_cased method names come next, only where they don't overwrite
4. shortcut methods for bean properties, etc
And then a set of rules for when a Java method simply can't be expressed on the Ruby side of things (like initialize, for example).