diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-04 09:55:14 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-04 09:55:14 +0000 |
commit | 91217bb82ddb6aaab8411deb1ddb711925b2a5e7 (patch) | |
tree | 6f290de25ecb359cd603a6277f5a8ee6b5ab20c9 /object.c | |
parent | f12e1bb3fa605f99201e02b80752725839e12e1a (diff) | |
download | ruby-91217bb82ddb6aaab8411deb1ddb711925b2a5e7.tar.gz ruby-91217bb82ddb6aaab8411deb1ddb711925b2a5e7.tar.xz ruby-91217bb82ddb6aaab8411deb1ddb711925b2a5e7.zip |
* object.c (rb_obj_alloc): RDoc updated. a patch from Gaston
Ramos <ramos.gaston at gmail.com> in [ruby-core:17073].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -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 * */ |