From: Mike@... Date: 2018-11-05T00:40:14+00:00 Subject: [ruby-core:89709] [Ruby trunk Feature#11689] Add methods allow us to get visibility from Method and UnboundMethod object. Issue #11689 has been updated by MikeVastola (Mike Vastola). Oh, sorry. I missed where you were looking for an example before. Here's a good one from the popular activesupport gem: [here](https://github.com/rails/rails/blob/c823f9252be2552c65bb1370ccf42a14de461439/activesupport/lib/active_support/deprecation/method_wrappers.rb#L69). As for the predicate methods, yes, they can be derrived from core methods and they -- like most core predicate methods, -- would be for convenience, but I disagree that that should be the determining factor. The same could be said for `#nil?`, `#is_a?`, `#respond_to?` and `#*_defined?` -- the functionality of which could be accomplished by checking the results of other core methods. ---------------------------------------- Feature #11689: Add methods allow us to get visibility from Method and UnboundMethod object. https://bugs.ruby-lang.org/issues/11689#change-74752 * Author: yui-knk (Kaneko Yuichiro) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- 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: