Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Patch for Struct::new documentation: msg#00000

Subject: Patch for Struct::new documentation
All,

I've attached a patch for the documentation for Struct::new.

The second edition of The Pickaxe Book says:

> Ruby 1.9 and later allow you to pass a block to a Struct's constructor.
> This block is evaluated in the context of the new struct's class and hence
> allows you conveniently to add instance methods to the new struct.

It turns out that this functionality has actually been present since 1.8.3!
This is the relevant ChangeLog entry:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/struct.c?view=log#rev5934

(although it references [ruby-talk:02606], it should really be
[ruby-core:02606]:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/2606

I've tried to stick to the submission guidelines, but please let me know if
I've screwed anything up!

Cheers,

------------------------------------------------
Paul Butcher
CTO
Texperts
Mobile: +44 (0) 7740 857648
Main: +44 (0) 1223 309080
Fax: +44(0) 1223 309082
Email: paul@xxxxxxxxxxxx
MSN: paul@xxxxxxxxxxxxxxx
AIM: paulrabutcher
Skype: paulrabutcher
LinkedIn: http://www.linkedin.com/in/paulbutcher
------------------------------------------------

Re5ult Limited Registered in England No 04909795 VAT registration number
GB 849 201 231. Registered office 22 Great James Street Londong WC1N 3ES

This email is confidential. It may be read, copied and used only by the
intended recipient. If you have received it in error, please contact us
immediately.



Attachment: rdoc_changes_to_struct.patch
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>