From: Thomas Sawyer Date: 2012-03-16T00:26:37+09:00 Subject: [ruby-core:43306] [ruby-trunk - Feature #1122] request for: Object#try Issue #1122 has been updated by Thomas Sawyer. How about just `respond` ? foo.respond(:bar) And really, there's no reason it can't support delegation style *too*. foo.respond.bar This later form will be slower of course because it has to create an intermediate delegator --at least until Ruby has some "high-order function" capability built-in (*hint* *hint*). But it's certainly the nicer notation in most cases. ---------------------------------------- Feature #1122: request for: Object#try https://bugs.ruby-lang.org/issues/1122#change-24609 Author: Narihiro Nakamura Status: Rejected Priority: Normal Assignee: Narihiro Nakamura Category: core Target version: 2.0.0 =begin Hi. Object#try is new feature of rails2.3. http://guides.rubyonrails.org/2_3_release_notes.html http://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/try.rb http://ozmm.org/posts/try.html Matz said: "OK, good name is the last problem." Anyone has better name? thanks. --- Narihiro Nakamura =end -- http://bugs.ruby-lang.org/