asciipack 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1459faeca6230153b447a21394155ed54cee71f
4
- data.tar.gz: 04fe8fa21164a3fc518dc6f18d4f817bd1abc446
3
+ metadata.gz: 3ff7b4041e8fa775567861e681624314b5c30725
4
+ data.tar.gz: d13eabb400af0ca2b595ed227759869722619725
5
5
  SHA512:
6
- metadata.gz: db669a6873f4df13b32a65319a147c897828a25444a51e7bf95320ec815245fc3560cbe9767146d303c1c3ffc442d7a0421e3fc29856b31c3f3a101366d4ceee
7
- data.tar.gz: 9a0b27bdcfbd0aa0c1cccbf6dcb3aa85c7bc6eecec3958fc5a90eaea6bacc289e7a5fdb2ad37e920317ad91e75f81e44fe4c5b7e3c5322324018c6b4443517aa
6
+ metadata.gz: b4bffcf8fe72cbf45bb954b60f77e6dfdab0c9368c33c9e8430e7288272165b20fe8143f20ef5c2b4177784b9430fb98f554bfd6e387ab4d7ad355f886aa753b
7
+ data.tar.gz: b22019fc12434cac3925b41166ed365a4cbc32ff1deab600239a632b36fb7af90c5c35e2b813f51034f6ad7c448c80cee6ee5e3a9163c069826cf048e0b68f27
@@ -318,16 +318,13 @@ Unpacker_clear (VALUE self)
318
318
  }
319
319
 
320
320
  static VALUE
321
- AsciiPack_unpack (int argc, VALUE *argv)
321
+ AsciiPack_unpack (int argc, VALUE *argv, VALUE self)
322
322
  {
323
- VALUE v = argv[0];
324
- VALUE self = Unpacker_alloc(cAsciiPack_Unpacker);
325
-
326
- UNPACKER(self, ptr);
327
-
328
- Unpacker_buffer_feed(ptr, v);
329
-
330
- return Unpacker_buffer_read(ptr);
323
+ VALUE unpacker = rb_funcall(cAsciiPack_Unpacker, rb_intern("new"), 0);
324
+ rb_funcall(unpacker, rb_intern("feed"), 1, argv[0]);
325
+ VALUE res = rb_funcall(unpacker, rb_intern("read"), 0);
326
+ rb_funcall(unpacker, rb_intern("clear"), 0);
327
+ return res;
331
328
  }
332
329
 
333
330
  void
@@ -1,3 +1,3 @@
1
1
  module AsciiPack
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -48,8 +48,8 @@ end
48
48
  puts("|object|" + reports(0).keys.join("|") + "|")
49
49
  puts("|---|" + reports(0).keys.map{"---:"}.join("|") + "|")
50
50
 
51
- map16 = {}
52
- 0x10000.times {|i| map16[i.to_s] = 0 }
51
+ map32 = {}
52
+ 0x10000.times {|i| map32[i.to_s] = 0 }
53
53
 
54
54
  tt = Time.now
55
55
  {
@@ -57,7 +57,7 @@ tt = Time.now
57
57
  "str (1KB)" => ['a' * 1024],
58
58
  "str (1MB)" => ['a' * 1024*1024],
59
59
  "str (100MB)" => ['a' * 100*1024*1024],
60
- "map 32" => map16,
60
+ "map 32" => map32,
61
61
  "array 32" => Array.new(0x10000,0),
62
62
  }.each { |key, value|
63
63
  json_asciipack key, value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciipack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss