From bd45d89611aff095a65e22b64a3eb987bdda51b1 Mon Sep 17 00:00:00 2001 From: yumetodo Date: Sun, 28 Jul 2019 12:57:57 +0900 Subject: fix(msys2): detect RubyInstaller correctly RUBY_PLATFORM =~ /mingw/ also match with pure msys2 mingw64 env this bug was cause by d79643513b6f939968dc6670de9be27b5cfbde48 ref: - https://github.com/ruby2d/ruby2d/pull/91 - https://teratail.com/questions/202950 --- lib/ruby2d.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby2d.rb b/lib/ruby2d.rb index 3fb8721..0562ec5 100644 --- a/lib/ruby2d.rb +++ b/lib/ruby2d.rb @@ -20,7 +20,7 @@ unless RUBY_ENGINE == 'mruby' require 'ruby2d/sound' require 'ruby2d/music' - if RUBY_PLATFORM =~ /mingw/ + if defined?(RubyInstaller) s2d_dll_path = Gem::Specification.find_by_name('ruby2d').gem_dir + '/assets/mingw/bin' RubyInstaller::Runtime.add_dll_directory(File.expand_path(s2d_dll_path)) end -- cgit v1.2.3