aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2013-11-01 09:49:57 +0100
committerArun Agrawal <arunagw@gmail.com>2013-11-01 09:49:57 +0100
commit816126862e040b787cf11c8143f326798803f67c (patch)
treeb0db65713968230ece18f6959f173bc9fcff70d8 /actionpack/lib
parent1adcebdb582f1cd091c5472d864e7c97b99333d0 (diff)
downloadrails-816126862e040b787cf11c8143f326798803f67c.tar.gz
rails-816126862e040b787cf11c8143f326798803f67c.tar.bz2
rails-816126862e040b787cf11c8143f326798803f67c.zip
Warnings removed for ruby trunk
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/middleware/exception_wrapper.rb2
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 1de3d14530..37bf9c8c9f 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
def source_fragment(path, line)
return unless Rails.respond_to?(:root) && Rails.root
full_path = Rails.root.join(path)
- if File.exists?(full_path)
+ if File.exist?(full_path)
File.open(full_path, "r") do |file|
start = [line - 3, 0].max
lines = file.each_line.drop(start).take(6)