[前][次][番号順一覧][スレッド一覧]

ruby-changes:20213

From: drbrain <ko1@a...>
Date: Tue, 28 Jun 2011 07:51:53 +0900 (JST)
Subject: [ruby-changes:20213] drbrain:r32261 (trunk): * object.c (Init_Object): Teach RDoc what Init_class_hierarchy does to

drbrain	2011-06-28 07:51:42 +0900 (Tue, 28 Jun 2011)

  New Revision: 32261

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32261

  Log:
    * object.c (Init_Object):  Teach RDoc what Init_class_hierarchy does to
      hook up ri for BasicObject, Object, Module and Class.

  Modified files:
    trunk/ChangeLog
    trunk/object.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32260)
+++ ChangeLog	(revision 32261)
@@ -1,3 +1,8 @@
+Tue Jun 28 07:50:32 2011  Eric Hodel  <drbrain@s...>
+
+	* object.c (Init_Object):  Teach RDoc what Init_class_hierarchy does to
+	  hook up ri for BasicObject, Object, Module and Class.
+
 Tue Jun 28 05:03:32 2011  Hiroshi Nakamura  <nahi@r...>
 
 	* thread.c (rb_thread_local_aref): RDoc fix. Thread#[] example
Index: object.c
===================================================================
--- object.c	(revision 32260)
+++ object.c	(revision 32261)
@@ -2553,23 +2553,24 @@
  * \ingroup class
  */
 
-/*
+/*  Document-class: BasicObject
  *
- *  <code>BasicObject</code> is the parent class of all classes in Ruby.
- *  It's an explicit blank class.  <code>Object</code>, the root of Ruby's
- *  class hierarchy is a direct subclass of <code>BasicObject</code>.  Its
- *  methods are therefore available to all objects unless explicitly
- *  overridden.
+ *  BasicObject is the parent class of all classes in Ruby.  It's an explicit
+ *  blank class.
+ */
+
+/*  Document-class: Object
  *
- *  <code>Object</code> mixes in the <code>Kernel</code> module, making
- *  the built-in kernel functions globally accessible. Although the
- *  instance methods of <code>Object</code> are defined by the
- *  <code>Kernel</code> module, we have chosen to document them here for
- *  clarity.
+ *  Object is the root of Ruby's class hierarchy.  Its methods are available
+ *  to all classes unless explicitly overridden.
  *
+ *  Object mixes in the Kernel module, making the built-in kernel functions
+ *  globally accessible. Although the instance methods of Object are defined
+ *  by the Kernel module, we have chosen to document them here for clarity.
+ *
  *  In the descriptions of Object's methods, the parameter <i>symbol</i> refers
- *  to a symbol, which is either a quoted string or a
- *  <code>Symbol</code> (such as <code>:name</code>).
+ *  to a symbol, which is either a quoted string or a Symbol (such as
+ *  <code>:name</code>).
  */
 
 void
@@ -2579,6 +2580,14 @@
 
     Init_class_hierarchy();
 
+#if 0
+    // teach RDoc about these classes
+    rb_cBasicObject = rb_define_class("BasicObject", Qnil);
+    rb_cObject = rb_define_class("Object", rb_cBasicObject);
+    rb_cModule = rb_define_class("Module", rb_cObject);
+    rb_cClass =  rb_define_class("Class",  rb_cModule);
+#endif
+
 #undef rb_intern
 #define rb_intern(str) rb_intern_const(str)
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]