From: Run Paint Run Run Date: 2009-09-11T17:03:09+09:00 Subject: [ruby-core:25532] [Bug #2084] Method#source_location and Methods Created with `attr` Bug #2084: Method#source_location and Methods Created with `attr` http://redmine.ruby-lang.org/issues/show/2084 Author: Run Paint Run Run Status: Open, Priority: Low Category: core ruby -v: ruby 1.9.2dev (2009-09-11) [i686-linux] $ cat /tmp/attr.rb class C attr :a end p C.instance_methods(false) p C.instance_method(:a).source_location $ ruby -v /tmp/attr.rb ruby 1.9.2dev (2009-09-11) [i686-linux] [:a] nil Is it feasible to have Method#source_location work with methods created with _attr_(and friends)? Given that a common use for this feature is to extract documentation, it would be helpful if such methods could be located by introspection. ---------------------------------------- http://redmine.ruby-lang.org