ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: s.wanabe@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91649] [Ruby trunk Bug#15629] super_method fails on binded/unbinded/cloned methods
Date: Fri, 01 Mar 2019 00:57:21 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-15629.20190301005719.7377037788a415a1@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15629.20190301005719@ruby-lang.org

Issue #15629 has been reported by wanabe (_ wanabe).

----------------------------------------
Bug #15629: super_method fails on binded/unbinded/cloned methods
https://bugs.ruby-lang.org/issues/15629

* 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         # => #<Method: A#foo>
p m1.clone.super_method   # => nil
p m1.unbind.super_method  # => nil

m2 = C.instance_method(:foo)
p m2.super_method         # => #<UnboundMethod: A#foo>
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?



-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2019-03-01  0:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15629.20190301005719@ruby-lang.org>
2019-03-01  0:57 ` s.wanabe [this message]
2019-10-02 22:24 ` [ruby-core:95192] [Ruby master Bug#15629] super_method fails on binded/unbinded/cloned methods merch-redmine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-15629.20190301005719.7377037788a415a1@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).