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:
parent
2e601c284c
commit
55c9a95ac8
Notes:
git
2020-12-02 12:46:46 +09:00
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue