Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit e8bd804

Browse files
author
Igor Kapkov
committed
Fix depricated File.exists?
1 parent 98c6440 commit e8bd804

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

ext/libv8/checkout.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def checkout!
3636
end
3737

3838
def git?(dir)
39-
File.exists?(File.join(dir, '.git'))
39+
File.exist?(File.join(dir, '.git'))
4040
end
4141

4242
def check_git_svn!

ext/libv8/location.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def configure(context = MkmfContext.new)
3333

3434
def verify_installation!
3535
Libv8::Paths.object_paths.each do |p|
36-
fail ArchiveNotFound, p unless File.exists? p
36+
fail ArchiveNotFound, p unless File.exist? p
3737
end
3838
end
3939

ext/libv8/paths.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def config
1919

2020
def libv8_object(name)
2121
filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}"
22-
unless File.exists? filename
22+
unless File.exist? filename
2323
filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}"
2424
end
2525
return filename
@@ -28,7 +28,7 @@ def libv8_object(name)
2828
def libv8_profile
2929
base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}"
3030
debug = "#{base}.debug"
31-
File.exists?(debug) ? debug : "#{base}.release"
31+
File.exist?(debug) ? debug : "#{base}.release"
3232
end
3333

3434
def vendored_source_path

0 commit comments

Comments
 (0)