From: Dave@... Date: 2002-07-30T12:52:58+09:00 Subject: Ruby Weekly News Ruby Weekly News: 07/29/2002 A summary of activity on the ruby-talk mailing list, brought to you this week by Pat Eyler. ANNOUNCEMENTS ============= Vim compiler plugin for Ruby a Ruby compiler plugin which sets 'errorformat' and 'makeprg'. The plugin has been approved for inclusion in future releases of Vim (> 601). YAML4R 0.26 Another release of the YAML for Ruby project. OpenSSL for Ruby 0.1.2 A bugfix release of OpenSSL for Ruby. RADIUS for Ruby A module that provides an interface to the RADIUS protocol from Ruby. The interface is somewhat based on the Perl Net::Radius module. INTERESTING THREADS =================== use of #missing_method Tom asked about the use of #missing_method, and was told that #method_missing was the better choice ;) ... it was also mentioned that #method_missing added some hidden flow control to your code and that if the end result were acheivable some other way that it would be preferable. The consensus seems to be that #method_missing is a powerful tool, and can save a great deal of time (especially when writing wrapper-code) if used carefully. piping into ruby at command line Shashank tried to do this: % cat junk.txt | ruby -e "puts $_" But didn't get what he expected. This proves to be another case of shell interpolation biting the user. If you leave things in double quotes, the shell will play games with it ... single quotes are (often) your friend. Can I get data back from a fork? Jim Freeze asked about getting data back from a forked process. The answer is that you need to set up IPC between the parent and child processes. Jim was pointed at the Pickaxe, Ch. 22 (specifically IO#pipe) -- thanks Dave and Andy for such a great resource! The use of thread instead of fork, and the use of shared memory were also suggested.