From: Stefan Rusterholz Date: 2007-07-20T22:48:58+09:00 Subject: Re: RCR? Added syntax for chains that possibly return nil Trans wrote: > On Jul 20, 6:29 am, "Robert Dober" wrote: >> but it has more permissive semantics and will hide errors that >> bar->baz.foo >> will raise >> Robert > > But where is default in your example? You'd have: > > (bar->baz || default).foo > > T. Maybe you should reread the initial proposal. There is no default. In receiver->method, if receiver is nil, method won't be invoked and the expressions value is nil. If the receiver isn't nil, method is invoked on receiver just as with a normal . - HTH regards Stefan -- Posted via http://www.ruby-forum.com/.