mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't use deprecated String#each
This commit is contained in:
parent
84fb971c2f
commit
5eb893f72d
1 changed files with 2 additions and 0 deletions
|
@ -189,6 +189,8 @@ end_msg
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue