diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-04 07:21:20 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-04 07:21:20 -0800 |
commit | 0cbc2406ea9a03161d7ce4de9cae5ba0800a80e5 (patch) | |
tree | ec34f32165562c6338266a7a975745967bc87ecd | |
parent | c9402c0258e85f125ce7cdc292381eb8b9dcbbe0 (diff) | |
parent | 0f103679eb37ad5b76e21100166b91769b989f9e (diff) | |
download | rails-0cbc2406ea9a03161d7ce4de9cae5ba0800a80e5.tar.gz rails-0cbc2406ea9a03161d7ce4de9cae5ba0800a80e5.tar.bz2 rails-0cbc2406ea9a03161d7ce4de9cae5ba0800a80e5.zip |
Merge pull request #8744 from tricknotes/suppress-warning
Suppress warning about IO#lines in Ruby 2.0
-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 |