3 Sep 2007 22:20
Patch for Struct::new documentation
Paul Butcher <paul <at> texperts.com>
2007-09-03 20:20:48 GMT
2007-09-03 20:20:48 GMT
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(Continue reading)
RSS Feed