From: "jeremyevans0 (Jeremy Evans)" Date: 2021-11-18T17:23:27+00:00 Subject: [ruby-core:106153] [Ruby master Feature#11689] Add methods allow us to get visibility from Method and UnboundMethod object. Issue #11689 has been updated by jeremyevans0 (Jeremy Evans). I agree with @Eregon, to make progress, it's best to merge support for `public?`, `private?` and `protected?`. Anyone who wants to have a `visibility` method can then implement it easily: ```ruby class Method def visibility return :public if public? return :private if private? :protected end end ``` Is there anyone who objects to adding `public?`, `private?` and `protected?`? Unless there are objections, or someone comes up with a new term to replace `visibility` that @matz accepts, I plan to merge the pull request after the next developer meeting. ---------------------------------------- Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object. https://bugs.ruby-lang.org/issues/11689#change-94754 * 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: