Project

General

Profile

Bug #8044

Object#methods incompatible with prepend

Added by marcandre (Marc-Andre Lafortune) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
[ruby-core:53207]

Description

Object#methods incompatible with prepend:

o = Object.new
def o.foo; end
o.methods(false) # => [:foo], ok
o.singleton_class.send :prepend, Enumerable
o.methods(false) # => [], should be [:foo]

Related issues

Has duplicate Ruby trunk - Bug #8045: Object#singleton_methods incompatible with prependClosed2013-03-08

Associated revisions

Revision 39744
Added by nobu (Nobuyoshi Nakada) over 4 years ago

class.c: from the origin class

* class.c (rb_obj_singleton_methods): collect methods from the origin
class. [Bug #8044]

Revision 39744
Added by nobu (Nobuyoshi Nakada) over 4 years ago

class.c: from the origin class

* class.c (rb_obj_singleton_methods): collect methods from the origin
class. [Bug #8044]

Revision 39744
Added by nobu (Nobuyoshi Nakada) over 4 years ago

class.c: from the origin class

* class.c (rb_obj_singleton_methods): collect methods from the origin
class. [Bug #8044]

Revision 39744
Added by nobu (Nobuyoshi Nakada) over 4 years ago

class.c: from the origin class

* class.c (rb_obj_singleton_methods): collect methods from the origin
class. [Bug #8044]

History

#1 [ruby-core:53208] Updated by marcandre (Marc-Andre Lafortune) over 4 years ago

{public|protected|private}_methods have the same problem, since they all call class_instance_method_list

#2 Updated by nobu (Nobuyoshi Nakada) over 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39744.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


class.c: from the origin class

  • class.c (rb_obj_singleton_methods): collect methods from the origin class. [Bug #8044]

Also available in: Atom PDF