diff options
| author | Tom Black <[email protected]> | 2019-01-06 00:47:55 -0800 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2019-01-06 00:47:55 -0800 |
| commit | 9d2de68fea9ea8dec9c52b5cf7d2f9fdee5333a4 (patch) | |
| tree | da14c8aa46d067ad9b4c0599b9514398236220fa /lib | |
| parent | 7ffa1afb8d453b282aaa0198bf8f88308b55ab84 (diff) | |
| download | ruby2d-9d2de68fea9ea8dec9c52b5cf7d2f9fdee5333a4.tar.gz ruby2d-9d2de68fea9ea8dec9c52b5cf7d2f9fdee5333a4.zip | |
Silence uninitialized console variable warning
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ruby2d/window.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ruby2d/window.rb b/lib/ruby2d/window.rb index a952134..9e8b462 100644 --- a/lib/ruby2d/window.rb +++ b/lib/ruby2d/window.rb @@ -87,7 +87,11 @@ module Ruby2D @diagnostics = false # Console mode, enabled at command line - @console = $ruby2d_console_mode || false + if RUBY_ENGINE == 'ruby' + @console = defined?($ruby2d_console_mode) ? true : false + else + @console = false + end end # Class methods for convenient access to properties |
