oj 3.9.0 → 3.9.1

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
  SHA256:
3
- metadata.gz: bda4706ea9e50aef4bdfcd1c9708566b573da4e4c9f000ddf12f3e403a821c88
4
- data.tar.gz: 56dbfecea94b2c0e43aa4193aed7749e30d55e4c288770a193aac3c57850bea2
3
+ metadata.gz: 4a9bfd0e254e8c30855238077fd24a8398fe6f51027d061865a4bae5b8843577
4
+ data.tar.gz: df12b305f11cae6ed49e002b64f02681df83b613674cec99baeaacc9e9308b27
5
5
  SHA512:
6
- metadata.gz: 73176c366166bb1b6fbe0a20501db677679ef7af8aaab547b9dadbba5856370d844f3595b06208a05c9efd9437d6f167298a0c73ef41fed905017a9aa5b2f764
7
- data.tar.gz: 3c4731da851590f39cc71bd2cce9fb9e1e987ec22b54e2bfc948f8004d78dcb0b2bde464b784500958352f8dec045ba8e2ce3804769426821c7c03a11d95ce07
6
+ metadata.gz: 69db529090d8152e069fab0bb18327ba9cb823817e6282aafeb3caf073a723964e7daf9bf40ffe4921306d8b0caf0fa71e1912bfa6c9c411ee7b87ba8aa4be60
7
+ data.tar.gz: c438cdbc8e9ecb36a47b09d88a8e8170a76b1cb04ca966586b8096dbf176503aa9e88da3d4d429f1ad3bc0aef696f58d6367620a35c0f93fc5fda3ec43caa4f9
@@ -1069,7 +1069,7 @@ hash_set_num(struct _parseInfo *pi, Val kval, NumInfo ni) {
1069
1069
  oj_set_obj_ivar(parent, kval, rval);
1070
1070
  break;
1071
1071
  case T_HASH:
1072
- if (4 == parent->klen && NULL != parent->key && rb_cTime == parent->clas && 0 == strncmp("time", parent->key, 4)) {
1072
+ if (4 == parent->klen && NULL != parent->key && rb_cTime == parent->clas && 0 != ni->div && 0 == strncmp("time", parent->key, 4)) {
1073
1073
  int64_t nsec = ni->num * 1000000000LL / ni->div;
1074
1074
 
1075
1075
  if (ni->neg) {
@@ -276,7 +276,10 @@ hat_num(ParseInfo pi, Val parent, Val kval, NumInfo ni) {
276
276
  if (2 == kval->klen) {
277
277
  switch (kval->key[1]) {
278
278
  case 't': // time as a float
279
- {
279
+ if (0 == ni->div || 9 < ni->di) {
280
+ rb_raise(rb_eArgError, "Invalid time decimal representation.");
281
+ //parent->val = rb_time_nano_new(0, 0);
282
+ } else {
280
283
  int64_t nsec = ni->num * 1000000000LL / ni->div;
281
284
 
282
285
  if (ni->neg) {
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.9.0'
4
+ VERSION = '3.9.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.0
4
+ version: 3.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler