Skip to content

Commit

Permalink
Use File.exist? instead of removed File.exists? in Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
yahonda committed Dec 29, 2021
1 parent d7426d7 commit ae6defe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/oci8/oraconf.rb
Expand Up @@ -535,7 +535,7 @@ def self.guess_ic_dir
# No need to check the real path.
# The current instant client doesn't use @rpath or @loader_path.
when /\/libclntsh\.dylib/, /\/libnnz\d\d.dylib/
raise <<EOS unless File.exists?(libname)
raise <<EOS unless File.exist?(libname)
The output of "otool -L #{file}" is:
| #{IO.readlines("|otool -L #{file}").join(' | ')}
Ruby-oci8 doesn't work without DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def initialize(inc_dir, lib_dir)
# check inc_dir
inc_dirs = inc_dir.split(File::PATH_SEPARATOR)
ociinc = inc_dirs.find do |dir|
File.exists?("#{dir}/oci.h")
File.exist?("#{dir}/oci.h")
end
unless ociinc
raise <<EOS
Expand Down
2 changes: 1 addition & 1 deletion ruby-oci8.gemspec
Expand Up @@ -50,7 +50,7 @@ EOS
# add map files to analyze a core (minidump) file.
so_vers.each do |ver|
map_file = 'ext/oci8/oci8lib_#{ver}.map'
so_files << map_file if File.exists? map_file
so_files << map_file if File.exist? map_file
end

# least version in so_vers
Expand Down

0 comments on commit ae6defe

Please sign in to comment.