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

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 committed by Hiroshi SHIBATA
parent 2e601c284c
commit 55c9a95ac8
Notes: git 2020-12-02 12:46:46 +09:00

View file

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