From: Gaston Ramos Date: 2008-06-04T00:20:30+09:00 Subject: [PATH] Improve Class.allocate documentation --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Core, I readed class.allocate's documentation and I think that's a little incomplete and I added a bit explanation and an example. I Attached the patch. Looking forward for this being applied. Regards. +-------------------------------------+ Gast=F3n Ramos http://gastonramos.wordpress.com/ GNU/Linux Counter user #450312 --FL5UXtIhxfXey3p5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="improve_class_allocate_doc.patch" Index: object.c =================================================================== --- object.c (revision 16741) +++ object.c (working copy) @@ -1573,8 +1573,21 @@ * 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 * */ --FL5UXtIhxfXey3p5--