Don't fail when 'did_you_mean' is not available.

Although 'did_you_mean' is always available in upstream Ruby, it might
not be available when speed, memory, disk or network bandwidth is a
concern. This is typically the case for production environment, where
'did_you_mean' is of limited usage.

Also 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:29:17 +01:00 коммит произвёл Hiroshi SHIBATA
Родитель 2e601c284c
Коммит 55c9a95ac8
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

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