diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-31 11:47:51 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-10-31 11:47:51 -0700 |
commit | 4d4ff531b8807ee88a3fc46875c7e76f613956fb (patch) | |
tree | 69ad1741462a5f9582a8b111a5cd7182a710f80c /railties | |
parent | f7e0758714e645865361b5566253d3e7d896beff (diff) | |
download | rails-4d4ff531b8807ee88a3fc46875c7e76f613956fb.tar.gz rails-4d4ff531b8807ee88a3fc46875c7e76f613956fb.tar.bz2 rails-4d4ff531b8807ee88a3fc46875c7e76f613956fb.zip |
clean up some warnings on trunk ruby
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/paths.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 4faaf5ef1e..d1e88cfafd 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -223,7 +223,7 @@ module Rails # you need to load files in lib/ during the application configuration as well. def add_lib_to_load_path! #:nodoc: path = File.join config.root, 'lib' - if File.exists?(path) && !$LOAD_PATH.include?(path) + if File.exist?(path) && !$LOAD_PATH.include?(path) $LOAD_PATH.unshift(path) end end diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 7332444ab9..dd0b9c6d70 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -90,7 +90,7 @@ module Rails # Loads and returns the configuration of the database. def database_configuration yaml = paths["config/database"].first - if File.exists?(yaml) + if File.exist?(yaml) require "erb" YAML.load ERB.new(IO.read(yaml)).result elsif ENV['DATABASE_URL'] diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index c8a74e794b..f512aefb23 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -198,7 +198,7 @@ module Rails # Returns all expanded paths but only if they exist in the filesystem. def existent - expanded.select { |f| File.exists?(f) } + expanded.select { |f| File.exist?(f) } end def existent_directories |