Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.1.6
-
Component/s: Java Integration
-
Labels:None
-
Environment:Any
-
Number of attachments :
Description
I have some java classes which define a method named "initialize". These methods are expected to be called before the instance can be used. Ruby's initialize method hides the java instance method and I can never call that method. I haven't found any work around for this issue (_send_ invokes the Ruby's initialize method).
Is there any work around or possibility of a fix? This literally stopped me in my tracks while I was happily executing JRuby code until running into this issue.
There's a workaround using reflection, but it's really ugly. If your initialize method takes no args, it looks like this:
I've been meaning for a while to implement a java_call method that works like this:
Args and the result would be converted automatically.
Comments?