1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/rdoc] Add instance_methods because instance_method_list should be obsolete

https://github.com/ruby/rdoc/commit/9b1da32254
This commit is contained in:
aycabta 2020-05-21 22:58:50 +09:00
parent e6d1363ae6
commit 37b8a7afca

View file

@ -990,13 +990,21 @@ class RDoc::Context < RDoc::CodeObject
@instance_attributes ||= attributes.reject { |a| a.singleton } @instance_attributes ||= attributes.reject { |a| a.singleton }
end end
##
# Instance methods
def instance_methods
@instance_methods ||= method_list.reject { |a| a.singleton }
end
## ##
# Instance methods # Instance methods
#-- #--
# TODO rename to instance_methods # TODO remove this later
def instance_method_list def instance_method_list
@instance_method_list ||= method_list.reject { |a| a.singleton } @instance_methods ||= method_list.reject { |a| a.singleton }
warn '#instance_method_list is obsoleted, please use #instance_methods'
end end
## ##