Skip to content

Commit 17b43d7

Browse files
author
Sven Schwyn
committed
Use File#exist? to silence deprecation warnings.
1 parent 377917b commit 17b43d7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Rakefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ RDoc::Task.new do |rdoc|
5353
rdoc.rdoc_files.include("bin/*.rb")
5454
rdoc.rdoc_files.include("lib/**/*.rb")
5555
extra_files.each { |file|
56-
rdoc.rdoc_files.include(file) if File.exists?(file)
56+
rdoc.rdoc_files.include(file) if File.exist?(file)
5757
}
5858
end
59-

lib/net/sftp/operations/upload.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def initialize(sftp, local, remote, options={}, &progress) #:nodoc:
173173
process_next_entry
174174
end
175175
else
176-
raise ArgumentError, "expected a file to upload" unless local.respond_to?(:read) || ::File.exists?(local)
176+
raise ArgumentError, "expected a file to upload" unless local.respond_to?(:read) || ::File.exist?(local)
177177
@stack = [[local]]
178178
process_next_entry
179179
end

0 commit comments

Comments
 (0)