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

Posted by 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]
Posted by 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]
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.