From: Roger Pack Date: 2009-02-19T05:51:11+09:00 Subject: [ruby-core:22234] Re: [Feature #1122] request for: Object#try >>> Then how it is different from >>> foo.bar if foo.respond_to?(:bar) >>> >>> ? >> >> You don't have to write foo and bar twice :) >> >> I'm with you in thinking that adding another syntax >> foo.?bar >> seems a little much when a new method will do. >> -=r > > Agree on both points. But what does the new method return? I'm not sure. I'd imagine either nil or the method's return value. -=r