summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-31 21:41:21 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-31 21:41:21 +0000
commit4f69926f75cd90822408c915c2b4ec637c749dd1 (patch)
treed00df1b1e2541838ccb7bb09f81abe4418764c39 /object.c
parentee4f9b7ce5c056c503a116b8eb2b8199b3d87609 (diff)
* object.c (Init_Object): Restored Kernel documentation based on
Pickaxe book documentation. Patch by Zachary Scott. [ruby-trunk - Feature #6521] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/object.c b/object.c
index e1ad798480..daa7015254 100644
--- a/object.c
+++ b/object.c
@@ -2845,6 +2845,18 @@ Init_Object(void)
rb_define_private_method(rb_cBasicObject, "singleton_method_removed", rb_obj_dummy, 1);
rb_define_private_method(rb_cBasicObject, "singleton_method_undefined", rb_obj_dummy, 1);
+ /* Document-module: Kernel
+ *
+ * The Kernel module is included by class Object, so its methods are
+ * available in every Ruby object.
+ *
+ * The Kernel instance methods are documented in class Object while the
+ * module methods are documented here. These methods are called without a
+ * receiver and thus can be called in functional form:
+ *
+ * sprintf "%.1f", 1.234 #=> "1.2"
+ *
+ */
rb_mKernel = rb_define_module("Kernel");
rb_include_module(rb_cObject, rb_mKernel);
rb_define_private_method(rb_cClass, "inherited", rb_obj_dummy, 1);