List per-object methods with my_methods

I can't count the times I've found it useful to jump to console and
list the methods on an object. Of course, the default "methods" method
includes an extra 50 items. So I'm always typing "@object.methods -
Kernel.methods". Am I alone?

I wrote a patch that adds my_methods onto Object, which just acts as a
shortcut. I can understand if people don't think it belongs in the
core framework, but I think it's one of those small conveniences, like
Symbol#to_proc, that make Rails a pleasure.

Please provide feedback:

http://rails.lighthouseapp.com/projects/8994/tickets/240-a-useful-methods-with-my_methods

2008/5/23 Sandofsky :

I can't count the times I've found it useful to jump to console and
list the methods on an object. Of course, the default "methods" method
includes an extra 50 items. So I'm always typing "@object.methods -
Kernel.methods". Am I alone?

-1.

Just pass the argument false to #methods, i.e. @object.methods(false)
Or for a class, klass.instance_methods(false)

It should work for all the *methods family : instance_methods,
private_instance_methods, protected_instance_methods,
public_instance_methods, ... and so on.

   -- Jean-François.

This doesn't work for me. At least not for String and Hash. Is it only in 1.9?