ruby--ruby/ext/psych
Alan Wu 9357e310fb [ruby/psych] 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>.

https://github.com/ruby/psych/commit/251289ba83
2022-06-15 01:05:51 +09:00
..
lib [ruby/psych] Prepare to develop 5.0.0 2022-05-18 10:03:48 +09:00
.gitignore Ignore yaml source 2022-04-05 14:31:54 +09:00
depend [ruby/psych] Make a static library from PIC object files 2022-03-31 21:34:48 +09:00
extconf.rb [ruby/psych] Fix libyaml download failure rescue under miniruby 2022-06-15 01:05:51 +09:00
extlibs [ruby/psych] Update autoconf files bundled with yaml-2.5 2022-04-07 22:38:39 +09:00
psych.c
psych.gemspec Merge psych master: Removed the bundled libyaml 2022-03-25 09:53:07 +09:00
psych.h
psych_emitter.c
psych_emitter.h
psych_parser.c
psych_parser.h
psych_to_ruby.c
psych_to_ruby.h
psych_yaml_tree.c
psych_yaml_tree.h