Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

begin
require 'psych'
rescue LoadError
rescue LoadError => ex
# Skip warning message concerning missing yaml dependency as LoadError wasn't
# triggered due to a missing dependency but because of a conflicting version
# which was already activated.
raise if ex.message.match?(/already activated/)
Copy link
Copy Markdown

@deivid-rodriguez deivid-rodriguez Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RubyGems raises this as Gem::LoadError which inherits from ::LoadEror so perhaps better to check the actual exception class, which is more unlikely to change than the exception message.


case RUBY_ENGINE
when 'jruby'
warn "The Psych YAML extension failed to load.\n" \
Expand Down