diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-29 03:09:34 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-29 03:09:34 +0000 |
commit | 926301969f7970b5a59a065dabb234cddc590e6c (patch) | |
tree | 1962225c402f5ed2c75ed14b1eece1dd665fd0b4 /hash.c | |
parent | 54bbc098fa1e05570e960750bf2c86d45017e575 (diff) | |
download | ruby-926301969f7970b5a59a065dabb234cddc590e6c.tar.gz |
* math.c: Attach documentation for Math.
* object.c: Document NIL, TRUE, FALSE.
* io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR.
Document ARGF global constant.
* lib/rake: Hide deprecated toplevel constants from RDoc (import from
rake trunk).
* lib/thwait.rb: Document ThWait.
* lib/mathn.rb: Hide Math redefinition from RDoc
* lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync,
Synchronizer.
* parse.y: Document SCRIPT_LINES__.
* hash.c: Document ENV class and global constant.
* vm.c: Document TOPLEVEL_BINDING.
* version.c: Document RUBY_* constants.
* ruby.c: Document DATA and ARGV.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -2974,6 +2974,15 @@ Init_Hash(void) rb_define_method(rb_cHash,"compare_by_identity", rb_hash_compare_by_id, 0); rb_define_method(rb_cHash,"compare_by_identity?", rb_hash_compare_by_id_p, 0); + /* Document-class: ENV + * + * ENV is a hash-like accessor for environment variables. + */ + + /* + * Hack to get RDoc to regard ENV as a class: + * envtbl = rb_define_class("ENV", rb_cObject); + */ origenviron = environ; envtbl = rb_obj_alloc(rb_cObject); rb_extend_object(envtbl, rb_mEnumerable); @@ -3020,5 +3029,10 @@ Init_Hash(void) rb_define_singleton_method(envtbl,"assoc", env_assoc, 1); rb_define_singleton_method(envtbl,"rassoc", env_rassoc, 1); + /* + * ENV is a Hash-like accessor for environment variables. + * + * See ENV (the class) for more details. + */ rb_define_global_const("ENV", envtbl); } |