aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/try.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-06-04 23:21:48 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-06-04 23:21:48 -0500
commit4072de266a74edf4f432a200a322cf1ffd38d78e (patch)
tree922aba4cccab75056cae47ecc6ce54a8862915d3 /activesupport/lib/active_support/core_ext/object/try.rb
parentd63b69ba7f2b9111aeb04b50884949c2a4b6e584 (diff)
downloadrails-4072de266a74edf4f432a200a322cf1ffd38d78e.tar.gz
rails-4072de266a74edf4f432a200a322cf1ffd38d78e.tar.bz2
rails-4072de266a74edf4f432a200a322cf1ffd38d78e.zip
remove double hyphen that doesn't allow properly parsing
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/try.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/try.rb6
1 files changed, 1 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 30c835f5cd..16a799ec03 100644
--- a/activesupport/lib/active_support/core_ext/object/try.rb
+++ b/activesupport/lib/active_support/core_ext/object/try.rb
@@ -11,8 +11,6 @@ class Object
# subclasses of +BasicObject+. For example, using try with +SimpleDelegator+ will
# delegate +try+ to target instead of calling it on delegator itself.
#
- # ==== Examples
- #
# Without +try+
# @person && @person.name
# or
@@ -27,7 +25,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#public_send+, unless called on +NilClass+.
def try(*a, &b)
if a.empty? && block_given?
@@ -42,8 +40,6 @@ class NilClass
# Calling +try+ on +nil+ always returns +nil+.
# It becomes specially helpful when navigating through associations that may return +nil+.
#
- # === Examples
- #
# nil.try(:name) # => nil
#
# Without +try+