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

ruby-changes:5312

From: matz <ko1@a...>
Date: Wed, 4 Jun 2008 18:55:32 +0900 (JST)
Subject: [ruby-changes:5312] Ruby:r16813 (trunk): * object.c (rb_obj_alloc): RDoc updated. a patch from Gaston

matz	2008-06-04 18:55:14 +0900 (Wed, 04 Jun 2008)

  New Revision: 16813

  Modified files:
    trunk/ChangeLog
    trunk/object.c

  Log:
    * object.c (rb_obj_alloc): RDoc updated.  a patch from Gaston
      Ramos <ramos.gaston at gmail.com> in [ruby-core:17073].

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16813&r2=16812&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/object.c?r1=16813&r2=16812&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16812)
+++ ChangeLog	(revision 16813)
@@ -1,3 +1,8 @@
+Wed Jun  4 18:53:39 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* object.c (rb_obj_alloc): RDoc updated.  a patch from Gaston
+	  Ramos <ramos.gaston at gmail.com> in [ruby-core:17073].
+
 Wed Jun  4 18:36:11 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* lib/rdoc.rb: massive spelling correction patch from Evan Farrar
Index: object.c
===================================================================
--- object.c	(revision 16812)
+++ object.c	(revision 16813)
@@ -1361,8 +1361,21 @@
  *  call-seq:
  *     class.allocate()   =>   obj
  *  
- *  Allocates space for a new object of <i>class</i>'s class. The
- *  returned object must be an instance of <i>class</i>.
+ *  Allocates space for a new object of <i>class</i>'s class and does not
+ *  call initialize on the new instance. The returned object must be an
+ *  instance of <i>class</i>.
+ *  
+ *      klass = Class.new do
+ *        def initialize(*args)
+ *          @initialized = true
+ *        end
+ *      
+ *        def initialized?
+ *          @initialized || false
+ *        end
+ *      end
+ *      
+ *      klass.allocate.initialized? #=> false
  *     
  */
 

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

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