зеркало из https://github.com/github/ruby.git
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:
Родитель
d668cd188c
Коммит
0b7969b6a3
|
@ -1,6 +1,8 @@
|
||||||
begin
|
begin
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
rescue LoadError
|
rescue LoadError => e
|
||||||
|
raise unless e.path == 'rubygems'
|
||||||
|
|
||||||
warn "`RubyGems' were not loaded."
|
warn "`RubyGems' were not loaded."
|
||||||
end if defined?(Gem)
|
end if defined?(Gem)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче