allocation_tracer 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a78ab5afb661776f40b461268284d07e8774b56c
4
- data.tar.gz: eea35b335ca74adc44b124c807def5c127b5512f
3
+ metadata.gz: 074616cf05a960aad7ae31bef26b74114a57a244
4
+ data.tar.gz: c1d299d0e76a959847cb29e5a6b5a1ff937aeb21
5
5
  SHA512:
6
- metadata.gz: 380a0ffdb0478d0adbe8530681e13806e41955c4baddb39919ff353b206e9b4362627077d89b089e4377da089afc1b02ab73ed71845c49f57414ebfb878a0a93
7
- data.tar.gz: 75dd1e0a3b72427801147909660942611ffcff99f7e95775d19d6d0fb15cc4dcfb431a2e527259a58b6fb669f84999d66d3e69b629288f4afe0b981df7f66b76
6
+ metadata.gz: 9c61c33f45023056481a8a49c428c93b31c8c64f22846b8bb3db5434c6c6a6d8f74ec8f6d60fed9e72777bc4f41442f8a0569ee0934097c11639113b9bbc24e4
7
+ data.tar.gz: d25df919f3141ce25176889538c0371b27fd3a4c66559e6455b26156a3e17a12dcba099763147d41e570a72418399f37bf7aec2c13f9d3c26ee1d3276db018d6
@@ -875,12 +875,10 @@ allocation_tracer_allocated_count_table(VALUE self)
875
875
  {
876
876
  struct traceobj_arg * arg = get_traceobj_arg();
877
877
  VALUE h = rb_hash_new();
878
- VALUE type;
879
878
  int i;
880
879
 
881
880
  for (i=0; i<T_MASK; i++) {
882
- type = type_sym(i);
883
- rb_hash_aset(h, ID2SYM(type), SIZET2NUM(arg->allocated_count_table[i]));
881
+ rb_hash_aset(h, type_sym(i), SIZET2NUM(arg->allocated_count_table[i]));
884
882
  }
885
883
 
886
884
  return h;
@@ -891,12 +889,10 @@ allocation_tracer_freed_count_table(VALUE self)
891
889
  {
892
890
  struct traceobj_arg * arg = get_traceobj_arg();
893
891
  VALUE h = rb_hash_new();
894
- VALUE type;
895
892
  int i;
896
893
 
897
894
  for (i=0; i<T_MASK; i++) {
898
- type = type_sym(i);
899
- rb_hash_aset(h, ID2SYM(type), SIZET2NUM(arg->freed_count_table[i]));
895
+ rb_hash_aset(h, type_sym(i), SIZET2NUM(arg->freed_count_table[i]));
900
896
  }
901
897
 
902
898
  return h;
@@ -1,3 +1,3 @@
1
1
  module ObjectSpace::AllocationTracer
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
@@ -249,4 +249,18 @@ describe ObjectSpace::AllocationTracer do
249
249
  expect(table[:T_NONE]).to be nil
250
250
  end
251
251
  end
252
+
253
+ describe 'ObjectSpace::AllocationTracer.allocated_count_table' do
254
+ it 'should return a Hash object' do
255
+ h = ObjectSpace::AllocationTracer.allocated_count_table
256
+ expect(h[:T_NONE]).to be 0
257
+ end
258
+ end
259
+
260
+ describe 'ObjectSpace::AllocationTracer.freed_count_table' do
261
+ it 'should return a Hash object' do
262
+ h = ObjectSpace::AllocationTracer.freed_count_table
263
+ expect(h[:T_NONE]).to be 0
264
+ end
265
+ end
252
266
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allocation_tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi Sasada