Classes that include modules that include Java interfaces and return nil for __jcreate_meta! throw an internal JRuby error --------------------------------------------------------------------------------------------------------------------------
Key: JRUBY-2969 URL: http://jira.codehaus.org/browse/JRUBY-2969 Project: JRuby Issue Type: Bug Reporter: Logan Barnett Assignee: Thomas E Enebo Fix For: JRuby 1.1.5 Given a module that implements an interface, and a Class includes that module AND returns nil for __jcreate_meta!, an internal JRuby error will be thrown. In this example, toggle the crash variable to see it crash/work. {noformat} module SuperInterface include Java::java::awt::event::ComponentListener end class FrameTest #< Java::javax::swing::JFrame crash = true if crash include SuperInterface else include Java::java::awt::event::ComponentListener end def initialize @view = Java::javax::swing::JFrame.new @view.add_component_listener self end def __jcreate_meta! nil end end FrameTest.new {noformat} Why would anyone implement their own __jcreate_meta! ? Well, I had method_missing returning nil all of the time... -- 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