From 82d41c969897cca28bb318f7caf301d520a2fbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 6 Oct 2011 00:34:39 +0200 Subject: Revert "don't raise NoMethodError the tried method doesn't exists" This reverts commit 29a5aeaae976bf8432d57ec996c7c81932a39de6. --- activesupport/lib/active_support/core_ext/object/try.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/object/try.rb') diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index 4797c93e63..e77a9da0ec 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -28,8 +28,6 @@ class Object def try(*a, &b) if a.empty? && block_given? yield self - elsif !a.empty? && !respond_to?(a.first) - nil else __send__(*a, &b) end -- cgit v1.2.3