mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-13 06:43:20 -04:00
Merge pull request #38 from wolfsblu/master
Replace deprecated exists call
This commit is contained in:
@@ -218,7 +218,7 @@ module Neo
|
||||
|
||||
def add_progress(prog)
|
||||
@_contents = nil
|
||||
exists = File.exists?(PROGRESS_FILE_NAME)
|
||||
exists = File.exist?(PROGRESS_FILE_NAME)
|
||||
File.open(PROGRESS_FILE_NAME,'a+') do |f|
|
||||
f.print "#{',' if exists}#{prog}"
|
||||
end
|
||||
@@ -226,7 +226,7 @@ module Neo
|
||||
|
||||
def progress
|
||||
if @_contents.nil?
|
||||
if File.exists?(PROGRESS_FILE_NAME)
|
||||
if File.exist?(PROGRESS_FILE_NAME)
|
||||
File.open(PROGRESS_FILE_NAME,'r') do |f|
|
||||
@_contents = f.read.to_s.gsub(/\s/,'').split(',')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user