From 926301969f7970b5a59a065dabb234cddc590e6c Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 29 Jun 2011 03:09:34 +0000 Subject: * 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 --- hash.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 4b5cd33b0d..b49aff8a61 100644 --- a/hash.c +++ b/hash.c @@ -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); } -- cgit v1.2.3