load_path: trim entries where possible to fix Ruby crashes#7251
load_path: trim entries where possible to fix Ruby crashes#7251MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
Conversation
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Great catch here @Bo98, well done!
There was a problem hiding this comment.
A possible extension I was thinking about could be to also trim any paths that don't :exist? or :directory?. Might be overkill, though.
There was a problem hiding this comment.
$LOAD_PATH.select { |d| Pathname(d).exist? } would trim 15 paths on my system, so it might be worth it. Notably it would trim the universal-darwin-19 paths in setup.rb (they are Catalina specific paths) and Ruby's own stuff like site_ruby.
There was a problem hiding this comment.
Those paths should actually be x86_64-darwin13 on everything using portable-ruby because it depends on the OS that Ruby was built on. Fun
|
|
Perfect 👍 |
|
Thanks again @Bo98! |
brew stylewith your changes locally?brew testswith your changes locally?