Skip to content

Commit

Permalink
Update Module#instance_methods documentation for visibility changes/a…
Browse files Browse the repository at this point in the history
…liases

Requested by matz in comment on #18435.
  • Loading branch information
jeremyevans committed Aug 24, 2022
1 parent 28a3434 commit f5f81bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,15 @@ class_instance_method_list(int argc, const VALUE *argv, VALUE mod, int obj, int
* B.instance_methods(true).include?(:method1) #=> true
* C.instance_methods(false) #=> [:method3]
* C.instance_methods.include?(:method2) #=> true
*
* Note that method visibility changes in the current class, as well as aliases,
* are considered as methods of the current class by this method:
*
* class C < B
* alias method4 method2
* protected :method2
* end
* C.instance_methods(false).sort #=> [:method2, :method3, :method4]
*/

VALUE
Expand Down

0 comments on commit f5f81bb

Please sign in to comment.