Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit f48ebc2

Browse files
committed
Use File.exist? instead of File.exists?
The latter is deprecated. Ref: https://ruby-doc.org/core-2.4.0/File.html#method-c-exists-3F And the former is exist since at least Ruby 2.2 (it is the oldest version that supported by sassc-rails). Ref: https://ruby-doc.org/core-2.2.0/File.html#method-c-exist-3F
1 parent 63acddc commit f48ebc2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/sassc/rails/importer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def imports(path, parent_path)
108108

109109
EXTENSIONS.each do |extension|
110110
try_path = File.join(search_path, file_name + extension.postfix)
111-
if File.exists?(try_path)
111+
if File.exist?(try_path)
112112
record_import_as_dependency try_path
113113
return extension.import_for(try_path, parent_dir, options)
114114
end

test/sassc_rails_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ def test_allows_for_inclusion_of_inline_source_maps
248248
# css_output = asset_output('css_application.css')
249249
# assert_match /globbed/, css_output
250250

251-
# if File.exists?("#{app_root}/log/development.log")
251+
# if File.exist?("#{app_root}/log/development.log")
252252
# log_file = "#{app_root}/log/development.log"
253-
# elsif File.exists?("#{app_root}/log/test.log")
253+
# elsif File.exist?("#{app_root}/log/test.log")
254254
# log_file = "#{app_root}/log/test.log"
255255
# else
256256
# flunk "log file was not created"

0 commit comments

Comments
 (0)