From: Robert Dober Date: 2007-07-21T17:15:08+09:00 Subject: Re: RCR? Added syntax for chains that possibly return nil On 7/21/07, Daniel DeLorme wrote: > Stefan Rusterholz wrote: > > Trans wrote: > >> Sure. I realize. I'm only pointing out that this -> operator is > >> equivalent to a rescue NoMethodError, > > > > So how can I explain to you that it *isn't*? > > rescue NoMethodError has the same disadvantage as rescue StandardError; > it may catch errors that you did not intend to. e.g.: This is a little detail I have overseen in the discussion -> *is not* equivalent to rescue NoMethodError, if I have understood correctly a-> b is begin a.b rescue NoMethodError raise unless a.nil? =========== end Robert -- I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby -- Kent Beck