From: Stefan Rusterholz Date: 2007-07-13T19:21:28+09:00 Subject: Undocumented argument on Object#methods Due to a discussion in irc.freenode.org#ruby I stumbled over an undocumented argument to Object#method. My suggested fix to the documentation is below, or was it left out intentionally? Regards Stefan in object.c: /* * call-seq: * obj.methods(singleton=true) => array * * Returns a list of the names of methods publicly accessible in * obj. This will include all the methods accessible in * obj's ancestors. * If singleton is set to false, it will return an array of obj's * singleton methods. * * class Klass * def kMethod() * end * end * k = Klass.new * k.methods[0..9] #=> ["kMethod", "freeze", "nil?", "is_a?", * "class", "instance_variable_set", * "methods", "extend", "__send__", "instance_eval"] * k.methods.length #=> 42 * def k.kSingletonMethod; end * k.methods(false) # => ["kSingletonMethod"] */ -- Posted via http://www.ruby-forum.com/.