From fd8b90bd1d5e874f0402af069fd7dd266b68532f Mon Sep 17 00:00:00 2001 From: Tom Black Date: Tue, 30 Oct 2018 15:55:09 -0400 Subject: Fix deprecation warnings Also use `-w` flag when running MRI tests --- lib/ruby2d/image.rb | 2 +- lib/ruby2d/music.rb | 2 +- lib/ruby2d/sound.rb | 2 +- lib/ruby2d/sprite.rb | 2 +- lib/ruby2d/text.rb | 2 +- lib/ruby2d/window.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/ruby2d/image.rb b/lib/ruby2d/image.rb index 5a57953..793c25a 100644 --- a/lib/ruby2d/image.rb +++ b/lib/ruby2d/image.rb @@ -11,7 +11,7 @@ module Ruby2D @path = path unless RUBY_ENGINE == 'opal' - unless File.exists? @path + unless File.exist? @path raise Error, "Cannot find image file `#{@path}`" end end diff --git a/lib/ruby2d/music.rb b/lib/ruby2d/music.rb index 5974a8a..e47131e 100644 --- a/lib/ruby2d/music.rb +++ b/lib/ruby2d/music.rb @@ -9,7 +9,7 @@ module Ruby2D def initialize(path) unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find audio file `#{path}`" end end diff --git a/lib/ruby2d/sound.rb b/lib/ruby2d/sound.rb index c1d4060..0a0b40d 100644 --- a/lib/ruby2d/sound.rb +++ b/lib/ruby2d/sound.rb @@ -9,7 +9,7 @@ module Ruby2D def initialize(path) unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find audio file `#{path}`" end end diff --git a/lib/ruby2d/sprite.rb b/lib/ruby2d/sprite.rb index 41c48e2..cc9e31f 100644 --- a/lib/ruby2d/sprite.rb +++ b/lib/ruby2d/sprite.rb @@ -11,7 +11,7 @@ module Ruby2D # Check if sprite file exists, unless running on the web unless RUBY_ENGINE == 'opal' - unless File.exists? path + unless File.exist? path raise Error, "Cannot find sprite image file `#{path}`" end end diff --git a/lib/ruby2d/text.rb b/lib/ruby2d/text.rb index 5f942cd..93ea062 100644 --- a/lib/ruby2d/text.rb +++ b/lib/ruby2d/text.rb @@ -17,7 +17,7 @@ module Ruby2D @font = opts[:font] || Font.default unless RUBY_ENGINE == 'opal' - unless File.exists? @font + unless File.exist? @font raise Error, "Cannot find font file `#{@font}`" end end diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index 5b0b7cb..fa12fd0 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -321,7 +321,7 @@ module Ruby2D # Add controller mappings from file def add_controller_mappings unless RUBY_ENGINE == 'opal' - if File.exists? @controller_mappings + if File.exist? @controller_mappings ext_add_controller_mappings(@controller_mappings) end end -- cgit v1.2.3