aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/try.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-12-02 20:31:06 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-12-02 20:31:06 -0200
commitae35a36afc616a0225d2f58da125abb318fd9b4a (patch)
tree6e5c7250824e4eb0bd9706961e4fb8f41eb66f8f /activesupport/lib/active_support/core_ext/object/try.rb
parent21eadc1b3f2eb818a4833381ee0a6cfa205f2955 (diff)
downloadrails-ae35a36afc616a0225d2f58da125abb318fd9b4a.tar.gz
rails-ae35a36afc616a0225d2f58da125abb318fd9b4a.tar.bz2
rails-ae35a36afc616a0225d2f58da125abb318fd9b4a.zip
:method: is not needed when RDoc can detect it
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/try.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/try.rb5
1 files changed, 0 insertions, 5 deletions
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 <tt>Object#send</tt> 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: