From: Kornelius Kalnbach Date: 2009-02-07T02:40:53+09:00 Subject: [ruby-core:21898] Re: [Feature #1122] request for: Object#try Narihiro Nakamura wrote: > Object#try is new feature of rails2.3. I mostly use @person.name rescue nil ^_^ #try is nice. > Matz said: "OK, good name is the last problem." Anyone has better > name? since IO and Groovy use a syntax with ?, what about Object#send? ? @person.send?(:name) but I think #try is the better name. send? also looks like it returns a boolean. #attempt would be synonymic, but it is an ugly word. #try might be confused with "try...except" in Java and other languages...but Ruby already uses Java keywords in a different way (new, case, extend(s), super), so I wouldn't worry about it. [murphy]