lib/rubygame.rb in rubygame-2.6.2 vs lib/rubygame.rb in rubygame-2.6.3
- old
+ new
@@ -87,7 +87,11 @@
# Loaded late so Screen can undefine some inherited Surface methods.
require File.join( this_dir, "rubygame", "screen" )
-Rubygame.init
-at_exit { Rubygame.quit }
+# Handle initialization automatically unless the RUBYGAME_NOINIT
+# environmental variable is set to something truthy.
+unless /^(1|t|true|y|yes)$/i =~ ENV["RUBYGAME_NOINIT"]
+ Rubygame.init
+ at_exit { Rubygame.quit }
+end