diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | object.c | 17 |
2 files changed, 20 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Wed Jun 4 18:53:39 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * 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@ruby-lang.org> * lib/rdoc.rb: massive spelling correction patch from Evan Farrar @@ -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 <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 * */ |