From: Dave@... Date: 2003-05-19T18:20:43+09:00 Subject: Ruby Weekly News Ruby Weekly News: 05/19/2003 A summary of activity on the ruby-talk mailing list, brought to you this week by Holden Glova. ANNOUNCEMENTS ============= Madeleine 0.3 Anders Bengtsson has released a new version of Madeleine. Madeleine is a Ruby implementation of Object Prevalence: Transparent persistence of business objects using command logging and snapshots. Get Madeleine([1]). OpenSSL Michal Rokos has released a new version of his OpenSSL module for Ruby. You should be using OpenSSL >= 0.9.7 & Ruby >= 1.7.3 Get Ruby OpenSSL([2]). wxRuby Beta 0.01 Park Heesob has announced he has been working on Ruby bindings for wxWindows([3]). This is an early beta release. Get wxRuby([4]). INTERESTING THREADS =================== Objects vs. Data Structures Elegantly designing solutions for even the simpliest problem can challenge many object-orientated paradigms and idioms. This thread shows some ways you can get things done while continueing to evolve your object model. An interesting read. Enumerable#each with arguments Carlos, an RWN reader, submitted this summary - many thanks Carlos. Joel VanderWerf issued a suggestion: instance methods in Enumerable should pass on their arguments to #each. The rationale was, there are classes (Joel mentioned REXML::Elements and ObjectSpace) where #each takes arguments, but one can not make #collect and friends use this each-with-argument method because they themselves don't take arguments. Matz answered([5]) with an alternative approach in 15 lines of Ruby code: extend Enumerable with a method #each_with, which takes the argument you want to pass to your object's #each and returns an object of class Enumerator. Call any Enumerable method on this object, and when its #each method is called, it will call your original object's each method #with the supplied argument. References 1. http://madeleine.sourceforge.net/ 2. http://savannah.nongnu.org/download/rubypki/ 3. http://www.wxwindows.org/ 4. http://sourceforge.jp/projects/wxruby 5. http://www.ruby-talk.org/71301