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 [ruby/psych] Make Ractor-ready. 2020-12-23 01:08:38 -05:00
psych.gemspec Merge psych master: Removed the bundled libyaml 2022-03-25 09:53:07 +09:00
psych.h Update psych-2.2.1 2016-11-30 13:55:02 +00:00
psych_emitter.c no ID cache in Init functions 2018-02-16 08:39:48 +00:00
psych_emitter.h ext: protoize no-arguments functions 2014-10-04 23:29:24 +00:00
psych_parser.c Suppress -Wshorten-64-to-32 warnings 2020-04-08 16:28:38 +09:00
psych_parser.h ext: protoize no-arguments functions 2014-10-04 23:29:24 +00:00
psych_to_ruby.c Update psych-2.2.1 2016-11-30 13:55:02 +00:00
psych_to_ruby.h * ext/psych/extconf.rb: use embedded libyaml if no system libyaml is 2012-11-28 04:34:41 +00:00
psych_yaml_tree.c Remove private_iv_get 2020-09-25 13:11:32 +09:00
psych_yaml_tree.h * ext/psych/extconf.rb: use embedded libyaml if no system libyaml is 2012-11-28 04:34:41 +00:00