ruby-changes:62376
From: Nobuyoshi <ko1@a...>
Date: Thu, 23 Jul 2020 14:57:37 +0900 (JST)
Subject: [ruby-changes:62376] 347639ad8a (master): Removed fragile tests in https://github.com/ruby/ruby/pull/3349
https://git.ruby-lang.org/ruby.git/commit/?id=347639ad8a From 347639ad8ad9fe2c6e88ff9b4faa21a11568bf6a Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 23 Jul 2020 14:55:53 +0900 Subject: Removed fragile tests in https://github.com/ruby/ruby/pull/3349 diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index de27058..a224263 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -504,30 +504,8 @@ class TestObjSpace < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/objspace/test_objspace.rb#L504 ;;; end - def test_dump_allocations - object = Object.new - assert_allocations_count(3) { ObjectSpace.dump(object) } - end - def test_anonymous_class_name - klass = Class.new - assert_allocations_count(4) { ObjectSpace.dump(klass) } - assert_allocations_count(3) { ObjectSpace.dump(klass) } - - mod = Module.new - assert_allocations_count(3) { ObjectSpace.dump(mod) } - assert_not_include ObjectSpace.dump(Class.new), '"name"' assert_not_include ObjectSpace.dump(Module.new), '"name"' end - - private - - def assert_allocations_count(count) - ObjectSpace.dump(Object.new) # warming up - - before = GC.stat(:total_allocated_objects) - yield - assert_equal count, GC.stat(:total_allocated_objects) - before - end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/