aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasiliy Ermolovich <younash@gmail.com>2012-05-13 14:25:41 +0300
committerVasiliy Ermolovich <younash@gmail.com>2012-05-13 14:25:41 +0300
commita7e0b2f843c4a6fdfe08a45c09d2ff44bcfe994e (patch)
treeea26c785ad474945656c47c913cf822d3ab7b94c
parent26e2c082595ecca360954cfc20ecc52221748f7b (diff)
downloadrails-a7e0b2f843c4a6fdfe08a45c09d2ff44bcfe994e.tar.gz
rails-a7e0b2f843c4a6fdfe08a45c09d2ff44bcfe994e.tar.bz2
rails-a7e0b2f843c4a6fdfe08a45c09d2ff44bcfe994e.zip
update docs on Object#try
-rw-r--r--activesupport/lib/active_support/core_ext/object/try.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb
index 40a8101ca3..3e63b1e82a 100644
--- a/activesupport/lib/active_support/core_ext/object/try.rb
+++ b/activesupport/lib/active_support/core_ext/object/try.rb
@@ -24,7 +24,7 @@ class Object
# Without a method argument try will yield to the block unless the receiver is nil.
# @person.try { |p| "#{p.first_name} #{p.last_name}" }
#--
- # +try+ behaves like +Object#send+, unless called on +NilClass+.
+ # +try+ behaves like +Object#public_send+, unless called on +NilClass+.
def try(*a, &b)
if a.empty? && block_given?
yield self