When define_method replaces an inherited Java method, the ruby_case_version is not replaced -------------------------------------------------------------------------------------------
Key: JRUBY-1327 URL: http://jira.codehaus.org/browse/JRUBY-1327 Project: JRuby Issue Type: Bug Components: Java Integration Affects Versions: JRuby 1.x Environment: JRuby built from source, OSX 10.4 Reporter: David Koontz The javaName and ruby_name versions of methods are not kept in synch. An example Java code: public class Base { public void firstMethod() { System.out.println("in original first method"); } public void secondMethod() { System.out.println("in original second method"); } } Ruby code: include_class 'Base' class Sub < Base def initialize(name, proc) super() self.class.send(:define_method, :firstMethod, proc.to_proc) end end def replacement_first_method puts "in replacement first method" end s = Sub.new(:firstMethod, method(:replacement_first_method)) puts s.firstMethod #=> replacement first method puts s.first_method #=> in original first method puts s.secondMethod #=> in original second method puts s.second_method #=> in original second method -- 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