From e98f2a74eb20e2b0866b66130501f8480798dd4c Mon Sep 17 00:00:00 2001 From: Ari Pollak Date: Wed, 22 Oct 2014 18:34:43 -0400 Subject: Bring try! into parity with try. Based on commit 5e51bdda. --- activesupport/lib/active_support/core_ext/object/try.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index 31919474ed..112ec05e15 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -59,7 +59,7 @@ class Object # does not implement the tried method. def try!(*a, &b) if a.empty? && block_given? - yield self + try(*a, &b) else public_send(*a, &b) end -- cgit v1.2.3