File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,24 +368,25 @@ rb_mod_nesting(VALUE _)
368368
369369/*
370370 * call-seq:
371- * Module.constants -> array
372- * Module.constants(inherited) -> array
371+ * Module.constants -> array
372+ * Module.constants(inherited) -> array
373373 *
374- * In the first form , returns an array of the names of all
375- * constants accessible from the point of call.
374+ * When no argument is provided , returns the names of all constants
375+ * accessible from the point of call as an array of symbols .
376376 * This list includes the names of all modules and classes
377377 * defined in the global scope.
378378 *
379- * Module.constants.first(4)
380- * # => [:ARGF, :ARGV, :ArgumentError, :Array]
379+ * class Foo
380+ * HELLO = 1
381381 *
382- * Module.constants.include?(:SEEK_SET) # => false
382+ * def self.my_constants = Module.constants
383+ * end
383384 *
384- * class IO
385- * Module.constants.include?(:SEEK_SET) # => true
386- * end
385+ * Foo.my_constants - Module.constants # => [:HELLO]
387386 *
388- * The second form calls the instance method +constants+.
387+ * With argument +inherited+ given, it is equivalent to calling
388+ * Module#constants on the class +Module+. See Module#constants
389+ * for more details.
389390 */
390391
391392static VALUE
You can’t perform that action at this time.
0 commit comments