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

ruby-changes:5317

From: knu <ko1@a...>
Date: Wed, 4 Jun 2008 19:37:40 +0900 (JST)
Subject: [ruby-changes:5317] Ruby:r16818 (ruby_1_8): * object.c (rb_obj_alloc): RDoc updated. a patch from Gaston

knu	2008-06-04 19:37:22 +0900 (Wed, 04 Jun 2008)

  New Revision: 16818

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/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/branches/ruby_1_8/ChangeLog?r1=16818&r2=16817&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/object.c?r1=16818&r2=16817&diff_format=u

Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 16817)
+++ ruby_1_8/ChangeLog	(revision 16818)
@@ -1,3 +1,8 @@
+Wed Jun  4 19:36:45 2008  Akinori MUSHA  <knu@i...>
+
+	* 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:50:47 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* version.h: corrupted.
Index: ruby_1_8/object.c
===================================================================
--- ruby_1_8/object.c	(revision 16817)
+++ ruby_1_8/object.c	(revision 16818)
@@ -1573,8 +1573,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/

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