aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/try.rb
diff options
context:
space:
mode:
authorVasiliy Ermolovich <younash@gmail.com>2012-05-12 14:07:21 +0300
committerVasiliy Ermolovich <younash@gmail.com>2012-05-12 14:07:21 +0300
commitb8f394f4a381e0b4cefd289df7cf7281bf0f79e9 (patch)
tree8fc648a496936ff01ac3ff47b200bd489d9725d8 /activesupport/lib/active_support/core_ext/object/try.rb
parent2091e5a65e2950689ad3242d67fdd7b15aa3411b (diff)
downloadrails-b8f394f4a381e0b4cefd289df7cf7281bf0f79e9.tar.gz
rails-b8f394f4a381e0b4cefd289df7cf7281bf0f79e9.tar.bz2
rails-b8f394f4a381e0b4cefd289df7cf7281bf0f79e9.zip
Object#try can't call private methods
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/try.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/try.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/try.rb b/activesupport/lib/active_support/core_ext/object/try.rb
index e77a9da0ec..40a8101ca3 100644
--- a/activesupport/lib/active_support/core_ext/object/try.rb
+++ b/activesupport/lib/active_support/core_ext/object/try.rb
@@ -1,5 +1,5 @@
class Object
- # Invokes the method identified by the symbol +method+, passing it any arguments
+ # Invokes the public 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.
#
# *Unlike* that method however, a +NoMethodError+ exception will *not* be raised
@@ -29,7 +29,7 @@ class Object
if a.empty? && block_given?
yield self
else
- __send__(*a, &b)
+ public_send(*a, &b)
end
end
end