mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user