mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Silence LoadError only if it is for rubygems
itself
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> Co-authored-by: Hiroshi SHIBATA <hsbt@ruby-lang.org>
This commit is contained in:
parent
d668cd188c
commit
0b7969b6a3
Notes:
git
2021-08-18 21:37:58 +09:00
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,8 @@
|
|||
begin
|
||||
require 'rubygems'
|
||||
rescue LoadError
|
||||
rescue LoadError => e
|
||||
raise unless e.path == 'rubygems'
|
||||
|
||||
warn "`RubyGems' were not loaded."
|
||||
end if defined?(Gem)
|
||||
|
||||
|
|
Loading…
Reference in a new issue