提交 daab53d8 编写于 作者: J Jeremy Kemper

Incompatible Symbol#to_proc was reverted upstream

上级 f67b070f
# Remove 1.8.7's incompatible method.
if :to_proc.respond_to?(:to_proc) && [1] != ([[1, 2]].map(&:first) rescue false)
class Symbol
remove_method :to_proc
end
end
unless :to_proc.respond_to?(:to_proc)
class Symbol
# Turns the symbol into a simple proc, which is especially useful for enumerations. Examples:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册