ruby-changes:63835
From: V=C3=ADt <ko1@a...>
Date: Wed, 2 Dec 2020 12:46:43 +0900 (JST)
Subject: [ruby-changes:63835] 55c9a95ac8 (master): Don't fail when 'did_you_mean' is not available.
https://git.ruby-lang.org/ruby.git/commit/?id=55c9a95ac8 From 55c9a95ac8ed1a44645cc8d7d80f2e5ebee6ec8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@r...> Date: Wed, 18 Dec 2019 14:29:17 +0100 Subject: 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. diff --git a/gem_prelude.rb b/gem_prelude.rb index 1d0158d..1c57c94 100644 --- a/gem_prelude.rb +++ b/gem_prelude.rb @@ -1,2 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/gem_prelude.rb#L1 require 'rubygems.rb' if defined?(Gem) -require 'did_you_mean' if defined?(DidYouMean) + +begin + require 'did_you_mean' +rescue LoadError +end if defined?(DidYouMean) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/