summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 343684cd39..ed5261eefb 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 2668582ed8..034a330c85 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