[ruby/did_you_mean] Keep the deprecated API for another year in case this could break 'bundle install'
https://github.com/ruby/did_you_mean/commit/0f4b0806b7
This commit is contained in:
parent
e537aa65c0
commit
651a098ea1
@ -113,7 +113,7 @@ module DidYouMean
|
|||||||
correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0'
|
correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0'
|
||||||
correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError)
|
correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError)
|
||||||
|
|
||||||
# TODO: Remove on 3.3:
|
# TODO: Remove on the 3.4 development start:
|
||||||
class DeprecatedMapping # :nodoc:
|
class DeprecatedMapping # :nodoc:
|
||||||
def []=(key, value)
|
def []=(key, value)
|
||||||
warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \
|
warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \
|
||||||
@ -132,7 +132,7 @@ module DidYouMean
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Remove on 3.3:
|
# TODO: Remove on the 3.4 development start:
|
||||||
SPELL_CHECKERS = DeprecatedMapping.new
|
SPELL_CHECKERS = DeprecatedMapping.new
|
||||||
deprecate_constant :SPELL_CHECKERS
|
deprecate_constant :SPELL_CHECKERS
|
||||||
private_constant :DeprecatedMapping
|
private_constant :DeprecatedMapping
|
||||||
|
Loading…
x
Reference in New Issue
Block a user