Permalink
Browse files

Quell ruby 2.1.0-preview2's deprecation warning about File.exists?

It says: "warning: File.exists? is a deprecated name, use File.exist? instead"
  • Loading branch information...
1 parent a906ab9 commit 61f52b597286cdeab0bb6f56c3b40cd34e9fc380 @chrisk committed Nov 24, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/fake_web/ext/net_http.rb
  2. +2 −2 lib/fake_web/responder.rb
@@ -14,7 +14,7 @@ def initialize_with_fakeweb(io, debug_output = nil)
when Socket, OpenSSL::SSL::SSLSocket, StringIO, IO
io
when String
- if !io.include?("\0") && File.exists?(io) && !File.directory?(io)
+ if !io.include?("\0") && File.exist?(io) && !File.directory?(io)
File.open(io, "r")
else
StringIO.new(io)
@@ -56,7 +56,7 @@ def body
body = body.to_s if defined?(Pathname) && body.is_a?(Pathname)
- if !body.include?("\0") && File.exists?(body) && !File.directory?(body)
+ if !body.include?("\0") && File.exist?(body) && !File.directory?(body)
File.read(body)
else
body
@@ -124,4 +124,4 @@ def print_file_string_options_deprecation_warning
end
end
-end
+end

1 comment on commit 61f52b5

Could you please bump fakeweb version, and release updated version?
Deprecation warning noise is present in all gems dependent on fakeweb

Please sign in to comment.