Skip to content

Commit ef5dfce

Browse files
hsbtmatzbot
authored andcommitted
[ruby/did_you_mean] Removed deprecated constants for Ruby 3.4
ruby/did_you_mean@e11bf81438
1 parent 86c01b6 commit ef5dfce

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

lib/did_you_mean.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,30 +113,6 @@ def self.correct_error(error_class, spell_checker)
113113
correct_error LoadError, RequirePathChecker if RUBY_VERSION >= '2.8.0'
114114
correct_error NoMatchingPatternKeyError, PatternKeyNameChecker if defined?(::NoMatchingPatternKeyError)
115115

116-
# TODO: Remove on the 3.4 development start:
117-
class DeprecatedMapping # :nodoc:
118-
def []=(key, value)
119-
warn "Calling `DidYouMean::SPELL_CHECKERS[#{key.to_s}] = #{value.to_s}' has been deprecated. " \
120-
"Please call `DidYouMean.correct_error(#{key.to_s}, #{value.to_s})' instead."
121-
122-
DidYouMean.correct_error(key, value)
123-
end
124-
125-
def merge!(hash)
126-
warn "Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. " \
127-
"Please call `DidYouMean.correct_error(error_name, spell_checker)' instead."
128-
129-
hash.each do |error_class, spell_checker|
130-
DidYouMean.correct_error(error_class, spell_checker)
131-
end
132-
end
133-
end
134-
135-
# TODO: Remove on the 3.4 development start:
136-
SPELL_CHECKERS = DeprecatedMapping.new
137-
deprecate_constant :SPELL_CHECKERS
138-
private_constant :DeprecatedMapping
139-
140116
# Returns the currently set formatter. By default, it is set to +DidYouMean::Formatter+.
141117
def self.formatter
142118
if defined?(Ractor)

0 commit comments

Comments
 (0)