From: Nobuyoshi Nakada Date: 2007-07-21T02:53:10+09:00 Subject: Re: RCR? Added syntax for chains that possibly return nil Hi, At Fri, 20 Jul 2007 19:02:59 +0900, Stefan Rusterholz wrote in [ruby-talk:260938]: > > It reminded me of a patch in `[ruby-dev:28217] ANDCALL > > operator'. It was &? though. > > > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/28217 > > Oh, what does it do, or how to use it? I'm sorry, my japanese doesn't go > beyond hajime and tatame... :-/ In short, same as your proposal. (tmp = h[:a] and tmp[:b]) can be without the temproray variable: h[:a]&?[:b] and h.a and h.a.b can be: h.a&?b And a followup was to make nil? to take a block which is called when the receiver isn't nil. -- Nobu Nakada