summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-16 03:43:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-16 03:43:44 +0000
commita116a6b3a8faa93daf1c1a6b804cf1edfc8b0d5b (patch)
tree835b176648efd6dbf0ea1854f52ae057ff3c2bfc
parentda6ba3284024ec8df6d270892a969fbae927aa6a (diff)
downloadruby-a116a6b3a8faa93daf1c1a6b804cf1edfc8b0d5b.tar.gz
ruby-a116a6b3a8faa93daf1c1a6b804cf1edfc8b0d5b.tar.xz
ruby-a116a6b3a8faa93daf1c1a6b804cf1edfc8b0d5b.zip
* eval.c (rb_mod_autoload_p, rb_f_autoload_p): added rdoc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--eval.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/eval.c b/eval.c
index 08773c6fd..6edc3149f 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 <code>Kernel::require</code>)
- * the first time that _module_ (which may be a <code>String</code> or
+ * the first time that _name_ (which may be a <code>String</code> 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 <code>Kernel::require</code>)
+ * the first time that _module_ (which may be a <code>String</code> or
+ * a symbol) is accessed.
+ *
+ * autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
*/
static VALUE