From a690ad46989e47f8f5b3b0a97ca0136332b094d9 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 4 Jun 2008 09:55:14 +0000 Subject: [PATCH] * object.c (rb_obj_alloc): RDoc updated. a patch from Gaston Ramos in [ruby-core:17073]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ object.c | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8aa698276..bc4ac6910f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 4 18:53:39 2008 Yukihiro Matsumoto + + * object.c (rb_obj_alloc): RDoc updated. a patch from Gaston + Ramos in [ruby-core:17073]. + Wed Jun 4 18:36:11 2008 Yukihiro Matsumoto * lib/rdoc.rb: massive spelling correction patch from Evan Farrar diff --git a/object.c b/object.c index 5d49b2ab6f..70e7f19833 100644 --- a/object.c +++ b/object.c @@ -1361,8 +1361,21 @@ rb_class_initialize(int argc, VALUE *argv, VALUE klass) * call-seq: * class.allocate() => obj * - * Allocates space for a new object of class's class. The - * returned object must be an instance of class. + * Allocates space for a new object of class's class and does not + * call initialize on the new instance. The returned object must be an + * instance of class. + * + * klass = Class.new do + * def initialize(*args) + * @initialized = true + * end + * + * def initialized? + * @initialized || false + * end + * end + * + * klass.allocate.initialized? #=> false * */