[#84867] [Ruby trunk Bug#14357] thread_safe tests suite segfaults — v.ondruch@...

Issue #14357 has been reported by vo.x (Vit Ondruch).

11 messages 2018/01/15

[#84980] [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — hsbt@...

Issue #13618 has been updated by hsbt (Hiroshi SHIBATA).

10 messages 2018/01/23
[#85012] Re: [Ruby trunk Feature#13618][Assigned] [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid — Eric Wong <normalperson@...> 2018/01/23

hsbt@ruby-lang.org wrote:

[ruby-core:85270] [Ruby trunk Bug#13973] super_method fails on some UnboundMethods

From: nagachika00@...
Date: 2018-01-31 01:36:46 UTC
List: ruby-core #85270
Issue #13973 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN to 2.3: REQUIRED, 2.4: REQUIRED

I have noticed this ticket during searching changesets related with r62115.
I think r60127 should be backported, but you should backport r62115 too. See #14421.

----------------------------------------
Bug #13973: super_method fails on some UnboundMethods
https://bugs.ruby-lang.org/issues/13973#change-70039

* Author: marcandre (Marc-Andre Lafortune)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: 2.5
* ruby -v: trunk
* Backport: 2.3: REQUIRED, 2.4: REQUIRED
----------------------------------------
`super_method` fails to go up the ancestry chain for methods that are only defined in included modules:

~~~ ruby
module A
  def foo
  end
end

module B
  def foo
  end
end

class C
  include A
  include B
end

class D
  def foo
  end
  include A
  include B
end

C.instance_method(:foo) # => #<UnboundMethod: C(B)#foo> (ok)
C.instance_method(:foo).super_method # => nil (wrong, should be <UnboundMethod: <something>(A)#foo>)
C.new.method(:foo).super_method # => #<Method: Object(A)#foo> (ok)
D.instance_method(:foo).super_method # => #<UnboundMethod: Object(B)#foo> (ok)
D.instance_method(:foo).super_method.super_method # => #<UnboundMethod: Object(A)#foo> (ok)
~~~

Note that the results for C and D's super_method differ slightly, with one outputing "C(B)" and the other "Object(B)". I don't understand why "Object" shows anywhere in my example. I would have expected the output to be "D(B)" in the later case. Should I open a different issue for this?





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

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next