diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-07-12 12:16:03 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-07-12 12:16:03 +0900 |
commit | b1d3b0a3f72b4c9dc40f81dceb9aca93614cd84b (patch) | |
tree | a3396a5655dad69e4102eedb970f8ae92d5567f6 /lib | |
parent | 2190eb07f34e205d8f6239000e4f037725a4e1eb (diff) | |
download | psych-b1d3b0a3f72b4c9dc40f81dceb9aca93614cd84b.tar.gz |
Added cross compilation task for mingw platform
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/psych.rb b/lib/psych.rb index 2fed434..76ed7d1 100644 --- a/lib/psych.rb +++ b/lib/psych.rb @@ -5,7 +5,11 @@ when 'jruby' require 'psych_jars' org.jruby.ext.psych.PsychLibrary.new.load(JRuby.runtime, false) else - require 'psych.so' + begin + require "psych/#{RUBY_VERSION[/\d+\.\d+/]}/psych.so" + rescue LoadError + require 'psych.so' + end end require 'psych/nodes' require 'psych/streaming' |