1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

clean up some warnings on trunk ruby

This commit is contained in:
Aaron Patterson 2013-10-31 11:47:51 -07:00
parent f7e0758714
commit 4d4ff531b8
4 changed files with 4 additions and 4 deletions

View file

@ -92,7 +92,7 @@ module ActiveSupport
def watched def watched
@watched || begin @watched || begin
all = @files.select { |f| File.exists?(f) } all = @files.select { |f| File.exist?(f) }
all.concat(Dir[@glob]) if @glob all.concat(Dir[@glob]) if @glob
all all
end end

View file

@ -223,7 +223,7 @@ module Rails
# you need to load files in lib/ during the application configuration as well. # you need to load files in lib/ during the application configuration as well.
def add_lib_to_load_path! #:nodoc: def add_lib_to_load_path! #:nodoc:
path = File.join config.root, 'lib' 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) $LOAD_PATH.unshift(path)
end end
end end

View file

@ -90,7 +90,7 @@ module Rails
# Loads and returns the configuration of the database. # Loads and returns the configuration of the database.
def database_configuration def database_configuration
yaml = paths["config/database"].first yaml = paths["config/database"].first
if File.exists?(yaml) if File.exist?(yaml)
require "erb" require "erb"
YAML.load ERB.new(IO.read(yaml)).result YAML.load ERB.new(IO.read(yaml)).result
elsif ENV['DATABASE_URL'] elsif ENV['DATABASE_URL']

View file

@ -198,7 +198,7 @@ module Rails
# Returns all expanded paths but only if they exist in the filesystem. # Returns all expanded paths but only if they exist in the filesystem.
def existent def existent
expanded.select { |f| File.exists?(f) } expanded.select { |f| File.exist?(f) }
end end
def existent_directories def existent_directories