diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2022-06-14 12:05:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 12:05:33 -0400 |
commit | 251289ba835294d454f20cd0e75bfa1ccb618e6b (patch) | |
tree | d94b05d9b81f0b997ac71ad3e186fc9250645422 /lib | |
parent | c3b5183f424b669a4df67dca5efb9c159f4715ee (diff) | |
download | psych-251289ba835294d454f20cd0e75bfa1ccb618e6b.tar.gz |
Fix libyaml download failure rescue under miniruby
I tried to build Ruby on a system without libyaml today and realized
that my attempt from <https://github.com/ruby/psych/pull/557> doesn't
fix the error in <https://github.com/ruby/psych/issues/552>. I still got
the same `LoadError` from `digest` which stopped the build.
Since `LoadError` is not a `StandardError`, a plain `rescue` doesn't catch
it. Catch `LoadError` explicitly instead and reduce the scope of the
`begin` block.
I tested this change in a Ruby build on macOS without libyaml installed
and confirmed that `make` continues with a warning instead of aborting:
*** Following extensions are not compiled:
psych:
Could not be configured. It will not be installed.
...
This should address <https://bugs.ruby-lang.org/issues/18790>.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions