diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-29 02:11:26 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-29 02:11:26 +0000 |
commit | 29dbed183e78db090032ae6d854aa44e34652bba (patch) | |
tree | 53fa8e409b613a1fbb1cda1e9e285e3467ffaa56 /gc.c | |
parent | fb3bd5a18a335b0f318bf30d246403caeabf344b (diff) | |
download | ruby-29dbed183e78db090032ae6d854aa44e34652bba.tar.gz |
* gc.c (gc_profile_total_time): fix off-by-one error in GC::Profiler.total_time.
* test/ruby/test_gc.rb (class TestGc): test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6140,7 +6140,7 @@ gc_profile_total_time(VALUE self) if (objspace->profile.run && objspace->profile.next_index > 0) { size_t i; - size_t count = objspace->profile.next_index - 1; + size_t count = objspace->profile.next_index; for (i = 0; i < count; i++) { time += objspace->profile.records[i].gc_time; |