Permalink
Browse files

Don't use deprecated String#each

  • Loading branch information...
1 parent 84fb971 commit 5eb893f72d189a7ad82c9a6f45873e2317f202d5 @jeremy jeremy committed Jun 7, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 actionpack/lib/action_controller/rack_process.rb
@@ -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

0 comments on commit 5eb893f

Please sign in to comment.