diff options
author | Peter Zhu <peter@peterzhu.ca> | 2021-11-08 15:15:38 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2021-11-08 15:39:53 -0500 |
commit | 39d3d24abbd63a109ebf70c229e3a6cab927fc90 (patch) | |
tree | aa4d746226f2990b84fda2b61350e2795115b863 /test/ruby/test_time.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_time.rb')
-rw-r--r-- | test/ruby/test_time.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 85667e2d1f..702bd07094 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -1282,22 +1282,6 @@ class TestTime < Test::Unit::TestCase assert_equal("366", t.strftime("%j")) end - def test_strftime_no_hidden_garbage - skip unless Thread.list.size == 1 - - fmt = %w(Y m d).map { |x| "%#{x}" }.join('-') # defeats optimization - t = Time.at(0).getutc - ObjectSpace.count_objects(res = {}) # creates strings on first call - GC.disable - before = ObjectSpace.count_objects(res)[:T_STRING] - val = t.strftime(fmt) - after = ObjectSpace.count_objects(res)[:T_STRING] - assert_equal before + 1, after, 'only new string is the created one' - assert_equal '1970-01-01', val - ensure - GC.enable - end - def test_num_exact_error bad = EnvUtil.labeled_class("BadValue").new x = EnvUtil.labeled_class("Inexact") do |