1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/objspace/test_objspace.rb

(test_trace_object_allocations_start_stop_clear): clear object
  allocation table first to get rid of erronous detection for obj3.
  [ruby-dev:49095] [Bug #11271]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2015-10-14 17:02:56 +00:00
parent 852acc92db
commit d0e8610582
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Thu Oct 15 01:57:03 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
* test/objspace/test_objspace.rb
(test_trace_object_allocations_start_stop_clear): clear object
allocation table first to get rid of erronous detection for obj3.
[ruby-dev:49095] [Bug #11271]
Thu Oct 15 01:53:38 2015 Benoit Daloze <eregontp@gmail.com>
* test/ostruct/test_ostruct.rb: Add tests for OpenStruct#respond_to.

View file

@ -177,6 +177,8 @@ class TestObjSpace < Test::Unit::TestCase
end
def test_trace_object_allocations_start_stop_clear
ObjectSpace.trace_object_allocations_clear # clear object_table to get rid of erronous detection for obj3
GC.disable # suppress potential object reuse. see [Bug #11271]
begin
ObjectSpace.trace_object_allocations_start
begin
@ -207,6 +209,8 @@ class TestObjSpace < Test::Unit::TestCase
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj1))
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj2))
assert_equal(nil, ObjectSpace.allocation_sourcefile(obj3))
ensure
GC.enable
end
def test_dump_flags