* eval.c: Improve rdoc for Module.constants [issue #5887]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
912b6606b3
commit
dea6efb5de
18
eval.c
18
eval.c
@ -286,15 +286,23 @@ rb_mod_nesting(void)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* Module.constants -> array
|
* Module.constants -> array
|
||||||
|
* Module.constants(inherited) -> array
|
||||||
*
|
*
|
||||||
* Returns an array of the names of all constants defined in the
|
* In the first form, returns an array of the names of all
|
||||||
* system. This list includes the names of all modules and classes.
|
* 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
|
static VALUE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user