mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Suppress warning about IO#lines in Ruby 2.0
actionpack/lib/action_dispatch/middleware/exception_wrapper.rb:99: IO#lines is deprecated; use #each_line instead
This commit is contained in:
parent
c9402c0258
commit
0f103679eb
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ module ActionDispatch
|
|||
if File.exists?(full_path)
|
||||
File.open(full_path, "r") do |file|
|
||||
start = [line - 3, 0].max
|
||||
lines = file.lines.drop(start).take(6)
|
||||
lines = file.each_line.drop(start).take(6)
|
||||
Hash[*(start+1..(lines.count+start)).zip(lines).flatten]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue