diff options
author | Ryunosuke SATO <tricknotes.rs@gmail.com> | 2013-01-04 23:30:09 +0900 |
---|---|---|
committer | Ryunosuke SATO <tricknotes.rs@gmail.com> | 2013-01-04 23:30:09 +0900 |
commit | 0f103679eb37ad5b76e21100166b91769b989f9e (patch) | |
tree | ec34f32165562c6338266a7a975745967bc87ecd /actionpack | |
parent | c9402c0258e85f125ce7cdc292381eb8b9dcbbe0 (diff) | |
download | rails-0f103679eb37ad5b76e21100166b91769b989f9e.tar.gz rails-0f103679eb37ad5b76e21100166b91769b989f9e.tar.bz2 rails-0f103679eb37ad5b76e21100166b91769b989f9e.zip |
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
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/exception_wrapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb index 58adf22862..869d0aa7af 100644 --- a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb +++ b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb @@ -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 |