diff options
| author | Tom Black <[email protected]> | 2018-10-30 15:55:09 -0400 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2018-10-30 15:55:09 -0400 |
| commit | fd8b90bd1d5e874f0402af069fd7dd266b68532f (patch) | |
| tree | c5a42bfd92e00ecc8085f7cef0cb5ec5b5bab8b3 /lib | |
| parent | bbd56099ebb359db02c8344b8af42e0bd1b7a835 (diff) | |
| download | ruby2d-fd8b90bd1d5e874f0402af069fd7dd266b68532f.tar.gz ruby2d-fd8b90bd1d5e874f0402af069fd7dd266b68532f.zip | |
Fix deprecation warnings
Also use `-w` flag when running MRI tests
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ruby2d/image.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/music.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/sound.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/sprite.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/text.rb | 2 | ||||
| -rw-r--r-- | lib/ruby2d/window.rb | 2 |
6 files changed, 6 insertions, 6 deletions
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 |
