From 5e8b113d4dd9a2be3097a20de29b2b069f52219a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 16 Aug 2005 03:43:44 +0000 Subject: * eval.c (rb_mod_autoload_p, rb_f_autoload_p): added rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 08773c6fdf..6edc3149f9 100644 --- a/eval.c +++ b/eval.c @@ -7805,11 +7805,11 @@ Init_eval() /* * call-seq: * mod.autoload(name, filename) => nil - * + * * Registers _filename_ to be loaded (using Kernel::require) - * the first time that _module_ (which may be a String or + * the first time that _name_ (which may be a String or * a symbol) is accessed in the namespace of _mod_. - * + * * module A * end * A.autoload(:B, "b") @@ -7830,7 +7830,16 @@ rb_mod_autoload(mod, sym, file) } /* - * MISSING: documentation + * call-seq: + * mod.autoload?(name) => String or nil + * + * Returns _filename_ to be loaded if _name_ is registered as + * +autoload+ in the namespace of _mod_. + * + * module A + * end + * A.autoload(:B, "b") + * A.autoload?(:B) # => "b" */ static VALUE @@ -7860,9 +7869,15 @@ rb_f_autoload(obj, sym, file) return rb_mod_autoload(ruby_cbase, sym, file); } - /* - * MISSING: documentation + * call-seq: + * autoload(module, filename) => nil + * + * Registers _filename_ to be loaded (using Kernel::require) + * the first time that _module_ (which may be a String or + * a symbol) is accessed. + * + * autoload(:MyModule, "/usr/local/lib/modules/my_module.rb") */ static VALUE -- cgit v1.2.3