Use yaml from homebrew
Homebrew is no longer located in /usr/local on Apple Silicon. It is now in /opt/homebrew. This leads to brew-originated yaml not being picked up during the build
We should probably manage yaml the same way we do it with readline. Looking at the code there's already a function that should do what is needed but it's not being called anywhere
https://github.com/rbenv/ruby-build/blob/cbdbc6e44be4756df3fc526ee97c1a5ce0632b74/bin/ruby-build#L1029-L1037
should we call it here? https://github.com/rbenv/ruby-build/blob/cbdbc6e44be4756df3fc526ee97c1a5ce0632b74/bin/ruby-build#L581-L583
That's a good idea! Note that use_homebrew_yaml would have to get wrapped in this condition to prevent overriding user's explicit configuration:
if [[ "$RUBY_CONFIGURE_OPTS" != *--with-libyaml-dir=* ]]
Yup, thx. I'll make a PR then
done https://github.com/rbenv/ruby-build/pull/1929