1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Daniel Niknam
717ad64f41 [rubygems/rubygems] Replace StandardError with Exception
We think it's unlikely that `rubygems/defaults/operating_system` could be shipped with a SyntaxError so StandardError could be better choice to prevent "false positives" errors.

https://github.com/rubygems/rubygems/commit/1f73e784dd
2021-08-31 19:06:14 +09:00
Daniel Niknam
34e073c0ca [rubygems/rubygems] Reword the message
For errors that could happened while loading `rubygems/defaults/operating_system`

https://github.com/rubygems/rubygems/commit/6e1e2141f8
2021-08-31 19:06:14 +09:00
Daniel Niknam
744e128ed9 [rubygems/rubygems] Exclude truffleruby from the test for failure of operating_system.rb
truffleruby does not raise any error when requiring `rubygems`.

https://github.com/rubygems/rubygems/commit/21e2fcd0b2
2021-08-31 19:06:14 +09:00
Daniel Niknam
aafc615b4a [rubygems/rubygems] Enhance error handling when loading the rubygems/defaults/operating_system file
When loading `rubygems/defaults/operating_system`
- we want to keep it silent if the raised exception is a LoadError
- we want to print a message in other cases and ask users to report the issue to their OS support.

Ruby 3 comes with special error handling for loading `rubygems` and it will show a warning when LoadError exception raised for requiring 'rubygem'.
Because of that, we decided to leave the LoadError scenario as it is.
Reference: d1998d8767/gem_prelude.rb (L1-L5)

https://github.com/rubygems/rubygems/commit/0a97e12fe1
2021-08-31 19:06:14 +09:00