diff options
author | Peter Zhu <[email protected]> | 2021-11-08 15:15:38 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2021-11-08 15:39:53 -0500 |
commit | 39d3d24abbd63a109ebf70c229e3a6cab927fc90 (patch) | |
tree | aa4d746226f2990b84fda2b61350e2795115b863 /test/ruby/test_io.rb | |
parent | 309406484b98fe0aea55016d8f5971b4e6b91761 (diff) |
[Feature #18290] Remove tests that test use of rb_gc_force_recycle
Remove tests that assume objects get force recycled.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5096
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index a90140fd0b..96e572b98d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3847,30 +3847,6 @@ __END__ end end; end - - def test_write_no_garbage - skip "multiple threads already active" if Thread.list.size > 1 - res = {} - ObjectSpace.count_objects(res) # creates strings on first call - [ 'foo'.b, '*' * 24 ].each do |buf| - with_pipe do |r, w| - GC.disable - begin - before = ObjectSpace.count_objects(res)[:T_STRING] - n = w.write(buf) - s = w.syswrite(buf) - after = ObjectSpace.count_objects(res)[:T_STRING] - ensure - GC.enable - end - assert_equal before, after, - "no strings left over after write [ruby-core:78898] [Bug #13085]: #{ before } strings before write -> #{ after } strings after write" - assert_not_predicate buf, :frozen?, 'no inadvertent freeze' - assert_equal buf.bytesize, n, 'IO#write wrote expected size' - assert_equal s, n, 'IO#syswrite wrote expected size' - end - end - end end def test_pread |