[前][次][番号順一覧][スレッド一覧]

ruby-changes:35393

From: nobu <ko1@a...>
Date: Tue, 9 Sep 2014 20:22:33 +0900 (JST)
Subject: [ruby-changes:35393] nobu:r47475 (trunk): GC.stat key name

nobu	2014-09-09 20:22:23 +0900 (Tue, 09 Sep 2014)

  New Revision: 47475

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47475

  Log:
    GC.stat key name
    
    * test/-ext-/tracepoint/test_tracepoint.rb: follow the change of
      key name of GC.stat.
    
    * test/ruby/test_hash.rb (TestHash#test_AREF_fstring_key): ditto.

  Modified files:
    trunk/test/-ext-/tracepoint/test_tracepoint.rb
    trunk/test/ruby/test_hash.rb
Index: test/ruby/test_hash.rb
===================================================================
--- test/ruby/test_hash.rb	(revision 47474)
+++ test/ruby/test_hash.rb	(revision 47475)
@@ -217,9 +217,9 @@ class TestHash < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_hash.rb#L217
 
   def test_AREF_fstring_key
     h = {"abc" => 1}
-    before = GC.stat(:total_allocated_object)
+    before = GC.stat(:total_allocated_objects)
     5.times{ h["abc"] }
-    assert_equal before, GC.stat(:total_allocated_object)
+    assert_equal before, GC.stat(:total_allocated_objects)
   end
 
   def test_ASET_fstring_key
Index: test/-ext-/tracepoint/test_tracepoint.rb
===================================================================
--- test/-ext-/tracepoint/test_tracepoint.rb	(revision 47474)
+++ test/-ext-/tracepoint/test_tracepoint.rb	(revision 47475)
@@ -43,10 +43,10 @@ class TestTracepointObj < Test::Unit::Te https://github.com/ruby/ruby/blob/trunk/test/-ext-/tracepoint/test_tracepoint.rb#L43
 
     newobj_count, free_count, gc_start_count, gc_end_mark_count, gc_end_sweep_count, *newobjs = *result
 
-    assert_operator stat2[:total_allocated_object] - stat1[:total_allocated_object], :>=, newobj_count
+    assert_operator stat2[:total_allocated_objects] - stat1[:total_allocated_objects], :>=, newobj_count
     assert_operator 1_000_000, :<=, newobj_count
 
-    assert_operator stat2[:total_freed_object] + stat2[:heap_final_slot] - stat1[:total_freed_object], :>=, free_count
+    assert_operator stat2[:total_freed_objects] + stat2[:heap_final_slots] - stat1[:total_freed_objects], :>=, free_count
     assert_operator stat2[:count] - stat1[:count], :==, gc_start_count
 
     assert_operator gc_start_count, :==, gc_end_mark_count

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]