From a638a71c721aacfc641f8b8b487ce6880e02e5cd Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 17 Jun 2023 17:56:41 +0900 Subject: [PATCH] test/hash.rb: remove some inspect/to_s tests CRuby does prohibits Hash modification during iteration, so remove those self modifying inspect/to_s. --- test/t/hash.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/t/hash.rb b/test/t/hash.rb index 9ff066b8c..3ce2e14f6 100644 --- a/test/t/hash.rb +++ b/test/t/hash.rb @@ -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