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

ruby-changes:29303

From: eregon <ko1@a...>
Date: Mon, 17 Jun 2013 18:16:42 +0900 (JST)
Subject: [ruby-changes:29303] eregon:r41355 (trunk): * ext/objspace/objspace.c: let rdoc know about objspace methods.

eregon	2013-06-17 18:16:32 +0900 (Mon, 17 Jun 2013)

  New Revision: 41355

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

  Log:
    * ext/objspace/objspace.c: let rdoc know about objspace methods.
      Specify 'objspace' should be required. See #8537.

  Modified files:
    trunk/ChangeLog
    trunk/ext/objspace/objspace.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41354)
+++ ChangeLog	(revision 41355)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jun 17 18:15:57 2013  Benoit Daloze  <eregontp@g...>
+
+	* ext/objspace/objspace.c: let rdoc know about objspace methods.
+	  Specify 'objspace' should be required. See #8537.
+
 Mon Jun 17 17:44:31 2013  Benoit Daloze  <eregontp@g...>
 
 	* gc.c (ObjectSpace): is a module not a class.
Index: ext/objspace/objspace.c
===================================================================
--- ext/objspace/objspace.c	(revision 41354)
+++ ext/objspace/objspace.c	(revision 41355)
@@ -155,6 +155,7 @@ memsize_of(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L155
  *  T_DATA may not be correct.
  *
  *  This method is not expected to work except C Ruby.
+ *  You need to <code>require 'objspace'</code> to use this method.
  */
 
 static VALUE
@@ -221,6 +222,7 @@ total_i(void *vstart, void *vend, size_t https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L222
  *  end
  *
  *  This method is not expected to work except C Ruby.
+ *  You need to <code>require 'objspace'</code> to use this method.
  */
 
 static VALUE
@@ -317,6 +319,7 @@ type2sym(enum ruby_value_type i) https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L319
  *  It may be changed in future.
  *
  *  This method is not expected to work except C Ruby.
+ *  You need to <code>require 'objspace'</code> to use this method.
  */
 
 static VALUE
@@ -392,6 +395,7 @@ cn_i(void *vstart, void *vend, size_t st https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L395
  *  It may be changed in future.
  *
  *  This method is not expected to work except C Ruby.
+ *  You need to <code>require 'objspace'</code> to use this method.
  */
 
 static VALUE
@@ -600,7 +604,7 @@ cto_i(void *vstart, void *vend, size_t s https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L604
  *  name, registered by rb_data_type_struct.
  *
  *  This method is not expected to work except C Ruby.
- *
+ *  You need to <code>require 'objspace'</code> to use this method.
  */
 
 static VALUE
@@ -728,6 +732,7 @@ collect_values(st_data_t key, st_data_t https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L732
  *  With this method, you can find memory leaks.
  *
  *  This method is not expected to work except in C Ruby.
+ *  You need to <code>require 'objspace'</code> to use this method.
  *
  *  Example:
  *    ObjectSpace.reachable_objects_from(['a', 'b', 'c'])
@@ -789,7 +794,11 @@ void Init_gc_hook(VALUE rb_mObjSpace); https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L794
 void
 Init_objspace(void)
 {
-    VALUE rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
+    VALUE rb_mObjSpace;
+#if 0
+    rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
+#endif
+    rb_mObjSpace = rb_const_get(rb_cObject, rb_intern("ObjectSpace"));
 
     rb_define_module_function(rb_mObjSpace, "memsize_of", memsize_of_m, 1);
     rb_define_module_function(rb_mObjSpace, "memsize_of_all", memsize_of_all_m, -1);

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

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