cbor 0.5.9.1 → 0.5.9.2

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: 0060580ce43d20f2d7a7014a8b4df72c26f37461
4
- data.tar.gz: c9ca0bca1a66f6b4c009014bc2096e0577169a8f
3
+ metadata.gz: 002ca3e4f23cf83903737be916ab1bd56d963069
4
+ data.tar.gz: fab2933826e8e23d8f2023a6b99bd8f62038b0d2
5
5
  SHA512:
6
- metadata.gz: 63dd0380890f047385965d6f8ee3a53c4fd3c2b05f5b878f389e7c097ef0b8369e0c46b081228e181096293087689effe708d9d2cec709ac24b2585b3ca71028
7
- data.tar.gz: 512f579e8f93549c5ad9bf1ba131d12e81b569703e72d6e85deb74866969e00b2af67d7c8ec219b60566b6ddafb8e6eb0bded308a497abf93ca3b3ccfe01c0ed
6
+ metadata.gz: 173e820a6eab4c9ff52312dff73c2a7c9a493b9afd19af6b15e2e2b4dc78ea3e73f2a1b1b0413f953c5f41b72953e7ccf0ea6844630bd5b36363ad89bf2a0dc0
7
+ data.tar.gz: a1b8ddc8db8da601850403c661a11f08843857cdd6248d335d29b31f7c47183647bbfb40037ac098986784078633bf939a3bf616ee347ea69cb8f3a8c8192d94
@@ -13,6 +13,7 @@ matrix:
13
13
  - rvm: ruby-head
14
14
  - rvm: rbx-2
15
15
  - rvm: 1.8.7
16
+ - rvm: 1.9.3
16
17
 
17
18
  gemfile:
18
19
  - Gemfile
@@ -73,6 +73,20 @@ static VALUE FalseClass_to_msgpack(int argc, VALUE* argv, VALUE self)
73
73
  return packer;
74
74
  }
75
75
 
76
+ #ifdef RUBY_INTEGER_UNIFICATION
77
+
78
+ static VALUE Integer_to_msgpack(int argc, VALUE* argv, VALUE self)
79
+ {
80
+ ENSURE_PACKER(argc, argv, packer, pk);
81
+ if (FIXNUM_P(self))
82
+ msgpack_packer_write_fixnum_value(pk, self);
83
+ else
84
+ msgpack_packer_write_bignum_value(pk, self);
85
+ return packer;
86
+ }
87
+
88
+ #else
89
+
76
90
  static VALUE Fixnum_to_msgpack(int argc, VALUE* argv, VALUE self)
77
91
  {
78
92
  ENSURE_PACKER(argc, argv, packer, pk);
@@ -87,6 +101,8 @@ static VALUE Bignum_to_msgpack(int argc, VALUE* argv, VALUE self)
87
101
  return packer;
88
102
  }
89
103
 
104
+ #endif
105
+
90
106
  static VALUE Float_to_msgpack(int argc, VALUE* argv, VALUE self)
91
107
  {
92
108
  ENSURE_PACKER(argc, argv, packer, pk);
@@ -162,8 +178,12 @@ void MessagePack_core_ext_module_init()
162
178
  rb_define_method(rb_cNilClass, "to_cbor", NilClass_to_msgpack, -1);
163
179
  rb_define_method(rb_cTrueClass, "to_cbor", TrueClass_to_msgpack, -1);
164
180
  rb_define_method(rb_cFalseClass, "to_cbor", FalseClass_to_msgpack, -1);
181
+ #ifdef RUBY_INTEGER_UNIFICATION
182
+ rb_define_method(rb_cInteger, "to_cbor", Integer_to_msgpack, -1);
183
+ #else
165
184
  rb_define_method(rb_cFixnum, "to_cbor", Fixnum_to_msgpack, -1);
166
185
  rb_define_method(rb_cBignum, "to_cbor", Bignum_to_msgpack, -1);
186
+ #endif
167
187
  rb_define_method(rb_cFloat, "to_cbor", Float_to_msgpack, -1);
168
188
  rb_define_method(rb_cString, "to_cbor", String_to_msgpack, -1);
169
189
  rb_define_method(rb_cArray, "to_cbor", Array_to_msgpack, -1);
@@ -1,3 +1,3 @@
1
1
  module CBOR
2
- VERSION = "0.5.9.1"
2
+ VERSION = "0.5.9.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9.1
4
+ version: 0.5.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann, standing on the tall shoulders of Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-11 00:00:00.000000000 Z
11
+ date: 2016-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project:
179
- rubygems_version: 2.4.8
179
+ rubygems_version: 2.6.7
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: CBOR, Concise Binary Object Representation.
@@ -194,4 +194,3 @@ test_files:
194
194
  - spec/random_compat.rb
195
195
  - spec/spec_helper.rb
196
196
  - spec/unpacker_spec.rb
197
- has_rdoc: false