Hi --

On Wed, 18 Jul 2007, Jeff Pritchard wrote:

> Have you veteran Rubyists come up with a nice way to write stuff like
> this that keeps the nice clean flow of Ruby's chaining in place, but
> solves the problems with potentially nil intermediate results?

I would tend not to view it as a candidate for chaining if I couldn't
be sure that the result of one operation would respond to the next
operation.  That's more like a case for conditional flow, so I'd do
something like:

   x = a.b
   y = x.c if x


David

-- 
* Books:
   RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242)
   RUBY FOR RAILS (http://www.manning.com/black)
* Ruby/Rails training
     & consulting:  Ruby Power and Light, LLC (http://www.rubypal.com)