提交 ae35a36a 编写于 作者: S Santiago Pastorino

:method: is not needed when RDoc can detect it

上级 21eadc1b
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 @@ def try(*a, &b)
__send__(*a, &b)
end
end
end
class NilClass #:nodoc:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册