Skip to content

Commit 02c829c

Browse files
committed
Remove deprecated method Kernel#=~
1 parent 9ef5d26 commit 02c829c

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Diff for: spec/tags/core/kernel/match_tags.txt

-1
This file was deleted.

Diff for: src/main/ruby/truffleruby/core/kernel.rb

+1-6
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,8 @@ def `(str) #`
181181
end
182182
module_function :` # `
183183

184-
def =~(other)
185-
warn "deprecated Object#=~ is called on #{Primitive.class(self)}; it always returns nil", uplevel: 1 if $VERBOSE
186-
nil
187-
end
188-
189184
def !~(other)
190-
r = self =~ other ? false : true
185+
r = nil ? false : true
191186
Primitive.regexp_last_match_set(Primitive.caller_special_variables, $~)
192187
r
193188
end

0 commit comments

Comments
 (0)