提交 5eb893f7 编写于 作者: J Jeremy Kemper

Don't use deprecated String#each

上级 84fb971c
......@@ -189,6 +189,8 @@ def each(&callback)
if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) }
@body.call(self, self)
elsif @body.is_a?(String)
@body.each_line(&callback)
else
@body.each(&callback)
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册