From ae35a36afc616a0225d2f58da125abb318fd9b4a Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 2 Dec 2010 20:31:06 -0200 Subject: :method: is not needed when RDoc can detect it --- activesupport/lib/active_support/core_ext/object/try.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb index 4d742b9ed2..ff812234e3 100644 --- a/activesupport/lib/active_support/core_ext/object/try.rb +++ b/activesupport/lib/active_support/core_ext/object/try.rb @@ -1,7 +1,4 @@ class Object - ## - # :method: try - # # Invokes the method identified by the symbol +method+, passing it any arguments # and/or the block specified, just like the regular Ruby Object#send does. # @@ -28,7 +25,6 @@ class Object # @person.try { |p| "#{p.first_name} #{p.last_name}" } #-- # +try+ behaves like +Object#send+, unless called on +NilClass+. - def try(*a, &b) if a.empty? && block_given? yield self @@ -36,7 +32,6 @@ class Object __send__(*a, &b) end end - end class NilClass #:nodoc: -- cgit v1.2.3