Skip to content

Commit b4a3dcf

Browse files
committed
Skip known failing require for psych
* In order to avoid loading RubyGems needlessly for `require 'psych'`.
1 parent 7b99270 commit b4a3dcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/mri/psych.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
org.jruby.ext.psych.PsychLibrary.new.load(JRuby.runtime, false)
1111
end
1212
else
13-
begin
14-
require "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
15-
rescue LoadError
13+
# TruffleRuby: avoid requiring a non-existing file, which would trigger loading RubyGems
14+
# begin
15+
# require "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
16+
# rescue LoadError
1617
require 'psych.so'
17-
end
18+
# end
1819
end
1920
require 'psych/nodes'
2021
require 'psych/streaming'

0 commit comments

Comments
 (0)