From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 92DA81F453 for ; Mon, 5 Nov 2018 00:40:21 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 1E050120F9C; Mon, 5 Nov 2018 09:40:18 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 9B23A120F77 for ; Mon, 5 Nov 2018 09:40:16 +0900 (JST) Received: by filter0163p3mdw1.sendgrid.net with SMTP id filter0163p3mdw1-18955-5BDF916D-1E 2018-11-05 00:40:13.657842997 +0000 UTC m=+352688.031824272 Received: from herokuapp.com (ec2-54-205-30-74.compute-1.amazonaws.com [54.205.30.74]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id _H6H3_OkRx6KwCIn0sstFg Mon, 05 Nov 2018 00:40:13.539 +0000 (UTC) Date: Mon, 05 Nov 2018 00:40:14 +0000 (UTC) From: Mike@Vasto.la To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 65094 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11689 X-Redmine-Issue-Author: yui-knk X-Redmine-Sender: MikeVastola X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS62IyR7btUi3zOhUgHAqncCE5Udpu6tksOq3k c6x0Niun6qnNwEfDe+x3ua2NJWSBU3RQVjJy2t1KIVIe+rdXr3Poe5GKvVS2TZFwuT2Fq+0wMLSZdg G8pfK3husWezp9/pTTZ0bgzeNI8TWqA8Oybw X-ML-Name: ruby-core X-Mail-Count: 89709 Subject: [ruby-core:89709] [Ruby trunk Feature#11689] Add methods allow us to get visibility from Method and UnboundMethod object. X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" 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/