test/hash.rb: remove some inspect/to_s tests

CRuby does prohibits Hash modification during iteration, so remove those
self modifying inspect/to_s.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-06-17 17:56:41 +09:00
parent 20552fe176
commit a638a71c72
-11
View File
@@ -880,17 +880,6 @@ end
hh[hh] = :recur
assert_equal("{#{s}, {...}=>:recur}", hh.__send__(meth))
end
[ar_entries, ht_entries].each do |entries|
cls = Class.new do
attr_accessor :h
def inspect; @h.replace(@h.dup); to_s; end
end
v = cls.new
h = entries.hash_for({_k: v})
v.h = h
assert_nothing_raised{h.__send__(meth)}
end
end
end