[ruby-core:109594] [Ruby master Feature#11689] Add methods allow us to get visibility from Method and UnboundMethod object.
From:
"Eregon (Benoit Daloze)" <noreply@...>
Date:
2022-08-20 12:34:03 UTC
List:
ruby-core #109594
Issue #11689 has been updated by Eregon (Benoit Daloze).
matz (Yukihiro Matsumoto) wrote in #note-24:
> Instead, each class should have lists of methods for each visibility.
I realize now you mean the existing Module#{public_instance_methods,protected_instance_methods,private_instance_methods}.
Then the functionality is technically already there but it's less convenient than what this ticket asks for and a lot less efficient.
I think we should add {Method,UnboundMethod}#{public?,private?,protected?} again.
----------------------------------------
Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object.
https://bugs.ruby-lang.org/issues/11689#change-98776
* Author: yui-knk (Kaneko Yuichiro)
* Status: Open
* Priority: Normal
----------------------------------------
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/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>