Method#source_location is nil for methods whose visibility is overridden
------------------------------------------------------------------------

                 Key: JRUBY-5648
                 URL: http://jira.codehaus.org/browse/JRUBY-5648
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6
            Reporter: George Ogata
             Fix For: JRuby 1.6


For example:

jruby-1.6.0 :001 > class C; def f; end; end             
 => nil 
jruby-1.6.0 :002 > class D < C; private :f; end         
 => D 
jruby-1.6.0 :003 > D.instance_method(:f).source_location
 => nil 

In contrast, MRI 1.9.2 says:

ruby-1.9.2-p180 :001 > class C; def f; end; end
 => nil 
ruby-1.9.2-p180 :002 > class D < C; private :f; end
 => D 
ruby-1.9.2-p180 :003 > D.instance_method(:f).source_location
 => ["(irb)", 1]

I've added a test to rubyspec here:

 * https://github.com/oggy/rubyspec

And a patch for JRuby here:

 * https://github.com/jruby/jruby.git


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