Forum: Ruby-core [ruby-trunk - Bug #8044][Open] Object#methods incompatible with prepend

0e610136db92027148906c92d57fdb36?d=identicon&s=25 marcandre (Marc-Andre Lafortune) (Guest)
on 2013-03-08 01:49
(Received via mailing list)
Issue #8044 has been reported by marcandre (Marc-Andre Lafortune).

----------------------------------------
Bug #8044: Object#methods incompatible with prepend
https://bugs.ruby-lang.org/issues/8044

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: current: 2.1.0
ruby -v: r39608


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]
0e610136db92027148906c92d57fdb36?d=identicon&s=25 marcandre (Marc-Andre Lafortune) (Guest)
on 2013-03-08 01:55
(Received via mailing list)
Issue #8044 has been updated by marcandre (Marc-Andre Lafortune).


 {public|protected|private}_methods have the same problem, since they
all call class_instance_method_list
----------------------------------------
Bug #8044: Object#methods incompatible with prepend
https://bugs.ruby-lang.org/issues/8044#change-37372

Author: marcandre (Marc-Andre Lafortune)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: current: 2.1.0
ruby -v: r39608


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]
This topic is locked and can not be replied to.