Don't fail when 'RubyGems' are not available.

Although 'RubyGems' are always available in upstream Ruby, it might not
be available optionally when Ruby is delivered via packaging systems.
E.g. Linux distributions.
This commit is contained in:
Vít Ondruch 2019-12-18 14:55:25 +01:00 committed by Hiroshi SHIBATA
parent 55c9a95ac8
commit 0ad7f2dd19
Notes: git 2020-12-02 12:46:46 +09:00
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,7 @@
require 'rubygems.rb' if defined?(Gem)
begin
require 'rubygems.rb'
rescue LoadError
end if defined?(Gem)
begin
require 'did_you_mean'