Make behavior clearer by returning false

This commit is contained in:
Esther W 2017-05-18 15:43:54 -07:00
parent 4da2f24b0e
commit 6325fb88c5

View File

@ -21,7 +21,7 @@ if ARGV == %w[--version] || ARGV == %w[-v]
end end
def require?(path) def require?(path)
path ||= "" return false if path.nil?
require path require path
rescue LoadError => e rescue LoadError => e
# we should raise on syntax errors but not if the file doesn't exist. # we should raise on syntax errors but not if the file doesn't exist.