summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 21:02:00 +0000
committertmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 21:02:00 +0000
commitb05721765ef08c56443221808f611b571f0de767 (patch)
tree55c5665ffc496b151e21f179f2cc2b2d22016de4
parent4f5d3c5e53037e979293e733d2d0edd4ff64c9f1 (diff)
* test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
free slots to fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_gc.rb3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 343684c..ed5261e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 1 06:00:49 2013 Aman Gupta <ruby@tmm1.net>
+
+ * test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consuming
+ free slots to fix test.
+
Sat Nov 30 21:22:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (dir_initialize): check unknown keywords. [ruby-dev:47152]
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 2668582..034a330 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -80,7 +80,8 @@ class TestGc < Test::Unit::TestCase
end
def test_gc_reason
- 100_000.times{ "a" + "b" }
+ GC.start
+ GC.stat[:heap_free_slot].times{ "a" + "b" }
assert_equal({:gc_by => :newobj},
GC::Profiler.decode_flags(GC.stat[:last_collection_flags]))
end