Skip to content

Commit

Permalink
Merge pull request #86 from jbourassa/did-you-mean-optional
Browse files Browse the repository at this point in the history
[changelog]

version: unreleased
changed: "Make `DidYouMean` integration optional (via #86) (@jbourassa)"
  • Loading branch information
solnic authored Jul 29, 2022
2 parents ad67e5b + 7a61abd commit e1d4df0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/dry/container/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ class Container
Error = Class.new(StandardError)

KeyError = Class.new(::KeyError)
DidYouMean.correct_error(KeyError, DidYouMean::KeyErrorChecker)
if defined?(DidYouMean::KeyErrorChecker)
DidYouMean.correct_error(KeyError, DidYouMean::KeyErrorChecker)
end

deprecate_constant(:Error)
end
Expand Down

0 comments on commit e1d4df0

Please sign in to comment.