зеркало из https://github.com/github/ruby.git
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:
Родитель
2e601c284c
Коммит
55c9a95ac8
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче