Skip to content

Commit

Permalink
change deprecated method File.exists? to File.exist?
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoto committed Sep 14, 2017
1 parent dd42dff commit cb4a30c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/bio/shell/core.rb
Expand Up @@ -195,7 +195,7 @@ def create_flat_dir(dbname)

def find_flat_dir(dbname)
dir = File.join(bioflat_dir, dbname.to_s.strip)
if File.exists?(dir)
if File.exist?(dir)
return dir
else
return nil
Expand All @@ -209,7 +209,7 @@ def load_config
end

def load_config_file(file)
if File.exists?(file)
if File.exist?(file)
STDERR.print "Loading config (#{file}) ... "
if hash = YAML.load(File.read(file))
@config.update(hash)
Expand Down Expand Up @@ -312,7 +312,7 @@ def load_object
end

def load_object_file(file)
if File.exists?(file)
if File.exist?(file)
STDERR.print "Loading object (#{file}) ... "
begin
bind = Bio::Shell.cache[:binding]
Expand Down Expand Up @@ -394,7 +394,7 @@ def load_history
end

def load_history_file(file)
if File.exists?(file)
if File.exist?(file)
STDERR.print "Loading history (#{file}) ... "
File.open(file).each do |line|
unless line[/^# /]
Expand Down Expand Up @@ -459,7 +459,7 @@ def script_end

def save_script
if @script_begin and @script_end and @script_begin <= @script_end
if File.exists?(script_file)
if File.exist?(script_file)
message = "Overwrite script file (#{script_file})? [y/n] "
else
message = "Save script file (#{script_file})? [y/n] "
Expand Down

0 comments on commit cb4a30c

Please sign in to comment.