From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id AFA701F4B4 for ; Fri, 16 Apr 2021 05:45:00 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8EFE8120D91; Fri, 16 Apr 2021 14:43:57 +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 8435E120CA1 for ; Fri, 16 Apr 2021 14:43:55 +0900 (JST) Received: by filterdrecv-6b8b466b66-vshtf with SMTP id filterdrecv-6b8b466b66-vshtf-14-60792456-2D 2021-04-16 05:44:54.883581507 +0000 UTC m=+33700.198194258 Received: from herokuapp.com (unknown) by ismtpd0164p1mdw1.sendgrid.net (SG) with ESMTP id 5yEkjBpaTci4tyEnThttBw for ; Fri, 16 Apr 2021 05:44:54.759 +0000 (UTC) Date: Fri, 16 Apr 2021 05:44:54 +0000 (UTC) From: matz@ruby.or.jp Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 9542 X-Redmine-Issue-Author: vrinek X-Redmine-Sender: matz 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-Redmine-MailingListIntegration-Message-Ids: 79519 X-SG-EID: =?us-ascii?Q?bXEIHGfdFwsIlBTndiToCp=2Fmc2rfxRD2sZAksRKJIHU0NBXLcZi+nTrIvAWAqY?= =?us-ascii?Q?DFUOvF7kPRNovyUiEvm7iITHviu2AqSRIUmZh4t?= =?us-ascii?Q?ab1zlfMQgoWS2LZIRdfAURx5mUjHqlVtstaAjDn?= =?us-ascii?Q?bFm+7bOA7StRX3AQtM628rVUvK4lF5CAf1mwiN4?= =?us-ascii?Q?GIGhfmp48DOKyKeL+7xSjks4YHbr6PTFQbg=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 103472 Subject: [ruby-core:103472] [Ruby master Bug#9542] Delegator does not delegate protected methods 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 #9542 has been updated by matz (Yukihiro Matsumoto). Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN) It's intentional. Matz. ---------------------------------------- Bug #9542: Delegator does not delegate protected methods https://bugs.ruby-lang.org/issues/9542#change-91569 * Author: vrinek (Konstantinos Karachalios) * Status: Open * Priority: Normal * ruby -v: 2.1.0p0 ---------------------------------------- The Delegator of the "delegate" standard library has changed its behaviour since 2.0 because of the change in "respond_to?" concerning protected methods. As of ruby 2.0, Delegator does not delegate protected methods any more. In case this is indeed a bug, I will prepare a pull request on github fixing the issue. On the other hand, if is intentional behaviour, something has to change in the documentation for "delegate" as well as [Delegator#respond_to_missing?](http://ruby-doc.org/stdlib-2.1.0/libdoc/delegate/rdoc/Delegator.html#method-i-respond_to_missing-3F) (at least the second argument's name). I can help with the code but I am not so confident in my documentation skills. ---Files-------------------------------- the_bug.rb (283 Bytes) output.txt (589 Bytes) -- https://bugs.ruby-lang.org/