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:
parent
f7e0758714
commit
4d4ff531b8
4 changed files with 4 additions and 4 deletions
|
@ -92,7 +92,7 @@ module ActiveSupport
|
|||
|
||||
def watched
|
||||
@watched || begin
|
||||
all = @files.select { |f| File.exists?(f) }
|
||||
all = @files.select { |f| File.exist?(f) }
|
||||
all.concat(Dir[@glob]) if @glob
|
||||
all
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue