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 +4 -4
- data/.travis.yml +1 -0
- data/ext/cbor/core_ext.c +20 -0
- data/lib/cbor/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 002ca3e4f23cf83903737be916ab1bd56d963069
|
4
|
+
data.tar.gz: fab2933826e8e23d8f2023a6b99bd8f62038b0d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 173e820a6eab4c9ff52312dff73c2a7c9a493b9afd19af6b15e2e2b4dc78ea3e73f2a1b1b0413f953c5f41b72953e7ccf0ea6844630bd5b36363ad89bf2a0dc0
|
7
|
+
data.tar.gz: a1b8ddc8db8da601850403c661a11f08843857cdd6248d335d29b31f7c47183647bbfb40037ac098986784078633bf939a3bf616ee347ea69cb8f3a8c8192d94
|
data/.travis.yml
CHANGED
data/ext/cbor/core_ext.c
CHANGED
@@ -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);
|
data/lib/cbor/version.rb
CHANGED
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.
|
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-
|
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.
|
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
|