diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-12-02 17:17:27 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-12-04 12:07:11 +0000 |
commit | ef5dfcef3ddf30399d9a83ed7e4735e98ec01a9a (patch) | |
tree | b00544fa9396f10a3b09a1e4821adec6d0858652 /lib | |
parent | 86c01b6aa0833e1bddda6ba8315c9d414aef0f76 (diff) |
[ruby/did_you_mean] Removed deprecated constants for Ruby 3.4
https://github.com/ruby/did_you_mean/commit/e11bf81438
Diffstat (limited to 'lib')
-rw-r--r-- | lib/did_you_mean.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/did_you_mean.rb b/lib/did_you_mean.rb index e177665099..74cd176042 100644 --- a/lib/did_you_mean.rb +++ b/lib/did_you_mean.rb @@ -113,30 +113,6 @@ module DidYouMean correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0' correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError) - # TODO: Remove on the 3.4 development start: - class DeprecatedMapping # :nodoc: - def []=(key, value) - warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \ - "Please call `DidYouMean.correct_error(#{key.to_s}, #{value.to_s})' instead." - - DidYouMean.correct_error(key, value) - end - - def merge!(hash) - warn "Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. " \ - "Please call `DidYouMean.correct_error(error_name, spell_checker)' instead." - - hash.each do |error_class, spell_checker| - DidYouMean.correct_error(error_class, spell_checker) - end - end - end - - # TODO: Remove on the 3.4 development start: - SPELL_CHECKERS = DeprecatedMapping.new - deprecate_constant :SPELL_CHECKERS - private_constant :DeprecatedMapping - # Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+. def self.formatter if defined?(Ractor) |