ruby-changes:22233
From: marcandre <ko1@a...>
Date: Fri, 13 Jan 2012 01:46:29 +0900 (JST)
Subject: [ruby-changes:22233] marcandRe: r34282 (ruby_1_9_3): merge revision(s) 34280:
marcandre 2012-01-13 01:46:15 +0900 (Fri, 13 Jan 2012) New Revision: 34282 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34282 Log: merge revision(s) 34280: * eval.c: Improve rdoc for Module.constants [issue #5887] Modified files: branches/ruby_1_9_3/eval.c Index: ruby_1_9_3/eval.c =================================================================== --- ruby_1_9_3/eval.c (revision 34281) +++ ruby_1_9_3/eval.c (revision 34282) @@ -286,15 +286,23 @@ /* * call-seq: * Module.constants -> array + * Module.constants(inherited) -> array * - * Returns an array of the names of all constants defined in the - * system. This list includes the names of all modules and classes. + * In the first form, returns an array of the names of all + * constants accessible from the point of call. + * This list includes the names of all modules and classes + * defined in the global scope. * - * p Module.constants.sort[1..5] + * Module.constants.first(4) + * # => [:ARGF, :ARGV, :ArgumentError, :Array] * - * <em>produces:</em> + * Module.constants.include?(:SEEK_SET) # => false * - * ["ARGV", "ArgumentError", "Array", "Bignum", "Binding"] + * class IO + * Module.constants.include?(:SEEK_SET) # => true + * end + * + * The second form calls the instance method +constants+. */ static VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/