On 7/13/07, Stefan Rusterholz <apeiros / gmx.net> wrote:
> 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
>  *  <i>obj</i>. This will include all the methods accessible in
>  *  <i>obj</i>'s ancestors.
>  *  If singleton is set to false, it will return an array of
> <i>obj</i>'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"]
>  */

Can you please create a patch according to
http://www.ruby-lang.org/en/community/ruby-core/

and file it to ruby patch tracker:
http://rubyforge.org/tracker/?atid=1700&group_id=426&func=browse

Thanks.

Jano