summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoryumetodo <[email protected]>2019-07-28 12:57:57 +0900
committerTom Black <[email protected]>2021-02-13 18:15:39 -0600
commitbd45d89611aff095a65e22b64a3eb987bdda51b1 (patch)
tree453feffac90062a2274b74c3480a6e7a0bdbeea3
parent95676d30fccfacc0215edd9820a45c094d9edfc8 (diff)
downloadruby2d-main.tar.gz
ruby2d-main.zip
fix(msys2): detect RubyInstaller correctlyHEADmain
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
-rw-r--r--lib/ruby2d.rb2
1 files changed, 1 insertions, 1 deletions
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