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 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 6CEA41F4BD for ; Wed, 2 Oct 2019 22:25:00 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 746B8120AB8; Thu, 3 Oct 2019 07:24:51 +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 879BD120A9C for ; Thu, 3 Oct 2019 07:24:49 +0900 (JST) Received: by filter0083p3iad2.sendgrid.net with SMTP id filter0083p3iad2-18309-5D9523B3-2D 2019-10-02 22:24:51.386453391 +0000 UTC m=+99174.439953180 Received: from herokuapp.com (unknown [54.161.249.108]) by ismtpd0093p1iad2.sendgrid.net (SG) with ESMTP id gDCBReqSSJaayyCoFYtovw for ; Wed, 02 Oct 2019 22:24:51.346 +0000 (UTC) Date: Wed, 02 Oct 2019 22:24:51 +0000 (UTC) From: merch-redmine@jeremyevans.net Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 70779 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15629 X-Redmine-Issue-Author: wanabe X-Redmine-Sender: jeremyevans0 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: =?us-ascii?Q?RVE3t853K5scBhbmJHUzZTFFeVC=2FZSUmHZ0Dc+26wcEi2CTgsF1oz0wTSSxGGN?= =?us-ascii?Q?BIfHshPpjzIJOD4odhf7J9=2FDpBhrSte2gt7mOCG?= =?us-ascii?Q?9n+3cOf2GuAdFS99YFcwMTwwONuWR2geqsDm5BB?= =?us-ascii?Q?dKiHNdHDbvnMxpWQMBGFLyiXmsMgYjaGrxiTT3Y?= =?us-ascii?Q?bT+Z+u=2FsgwRkdRXmlI9amYdII=2FU5LR8FGUw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 95192 Subject: [ruby-core:95192] [Ruby master Bug#15629] super_method fails on binded/unbinded/cloned 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 #15629 has been updated by jeremyevans0 (Jeremy Evans). File super_method-bind-unbind-clone-15629.patch added This bug is due to the fact that bind/unbind/clone do not copy the `iclass` entry, and without an `iclass` entry, `super_method` returns `nil`. Attached is a patch that fixes this issue. ---------------------------------------- Bug #15629: super_method fails on binded/unbinded/cloned methods https://bugs.ruby-lang.org/issues/15629#change-81866 * Author: wanabe (_ wanabe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- derived from #13973: ``` module A def foo end end module B def foo end end class C include A include B end c = C.new m1 = c.method(:foo) p m1.super_method # => # p m1.clone.super_method # => nil p m1.unbind.super_method # => nil m2 = C.instance_method(:foo) p m2.super_method # => # p m2.clone.super_method # => nil p m2.bind(c).super_method # => nil ``` `super_method` of binded/unbinded/cloned method should be `super_method` of original method, shouldn't it? ---Files-------------------------------- super_method-bind-unbind-clone-15629.patch (4.85 KB) -- https://bugs.ruby-lang.org/