Ruby object passed to Java method impl passed back to Ruby method impl loses 
original ruby instance
---------------------------------------------------------------------------------------------------

                 Key: JRUBY-2480
                 URL: http://jira.codehaus.org/browse/JRUBY-2480
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.1.1
            Reporter: Thomas E Enebo
            Priority: Blocker
             Fix For: JRuby 1.1.2
         Attachments: bug.tar.gz

The attached tar.gz shows a simple program which demonstrates the problem well. 
 Ruby instances passed around must round trip without getting lost.  This is 
just a missed check to see if it is IRubyObject in one of our many layers of 
conversion.

Output from code:

{noformat}
a.rb:11:in `foo': undefined method `color' for #<Color:0xbf5bb7 @color="red"> 
(NoMethodError)
        from 
/Users/enebo/workspace/jruby_trunk/lib/ruby/site_ruby/1.8/builtin/javasupport/proxy/interface.rb:174:in
 `__jcreate_proxy!'
        from a.rb:24
{noformat}

In a more elaborate script using Swing models I was getting back a less 
descriptive print which showed the object as 'Java::OrgRuby::RubyObject'.

-- 
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