Issue #11689 has been updated by Kaneko Yuichiro.


Sorry.

These methods are useful for inspecting Method object (e.g. debugging or documenting).
Currently if we need information about visibility, we should check `owner.public_instance_methods`, `owner.protected_instance_methods`, and `owner.private_instance_methods`:
see also pry: https://github.com/pry/pry/blob/1f3f7e7ceff27ef516536849fc44fdf010f91c93/lib/pry/method.rb#L343

----------------------------------------
Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object.
https://bugs.ruby-lang.org/issues/11689#change-54857

* Author: Kaneko Yuichiro
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Add `Method#visibility` and `UnboundMethod#visibility` for getting visibility from Method and UnboundMethod object.
In GitHub https://github.com/ruby/ruby/pull/1098.

---Files--------------------------------
0001-Add-Method-visibility-and-UnboundMethod-visibility.patch (3.11 KB)


-- 
https://bugs.ruby-lang.org/