Calling interface method on specific instance from Java doesn't work.
---------------------------------------------------------------------

                 Key: JRUBY-2927
                 URL: http://jira.codehaus.org/browse/JRUBY-2927
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
            Reporter: Ola Bini
            Assignee: Ola Bini
            Priority: Critical
             Fix For: JRuby 1.1.4


Since the Java Integration work, Java calling into specific interface 
implementations on a custom object doesn't seem to work anymore. The behavior 
can be easily seen with the HashMap constructor, which will take a Map argument 
and call size() on it:

{noformat}
class AMap
  include java.util.Map
end

obj = AMap.new

def obj.size
  0
end

java.util.HashMap.new(obj)
{noformat}

This will currently fail with a NoMethodError for size, which is incorrect. 
This problem makes all kinds of mocking and stubbing on Java instances 
impossible. I'm currently in the process of committing a failing spec for this 
behavior, and a fix should be forthcoming.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to