oj 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/oj/wab.c +9 -4
  3. data/lib/oj/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63050f31bc0315726a788659128470304b169f26
4
- data.tar.gz: fd104a575acd6334e08bf3575da67398a23cd40d
3
+ metadata.gz: 5751bb765a26b86b9e23a6fbc2bb4a127cdd8b10
4
+ data.tar.gz: be164b60130dad88db2de417ecae84b542a47d68
5
5
  SHA512:
6
- metadata.gz: dd48c5c1a681efcc47684534d51ca3c4010c4b81ea815dd6d329e90237f422d852449058435132a752ebfea2ae7f77d64deed92df3a06e45c5bbe6c6dfe83f17
7
- data.tar.gz: a0c15d440afc5243414d9e29657778b774647ef22d140a56649dff3f48af725be0992c8fb9251bac96d915203b919b27d118a702d0415837445180536a2ecb06
6
+ metadata.gz: 36f67b79a17e3bb452a3d10cdddaecb825b1cce08a4407e9ade9cee19a724e2ff73d99855b8da4da6d7bb0bf6d9f71708b4308c2f40e38c7d71d3d85f103180e
7
+ data.tar.gz: 36681b67bcd1f6a62aff34b4b3e8121eceb9f14be749430405b07fe736bc4e2e6fc0a783e74ac1d25a77945790c478706fe1bf1ee8cd09c8e0a9210b6b75b72b
@@ -214,7 +214,7 @@ dump_time(VALUE obj, Out out) {
214
214
 
215
215
  len = sprintf(buf, "%04d-%02d-%02dT%02d:%02d:%02d.%09ldZ",
216
216
  tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
217
- tm->tm_hour, tm->tm_min, tm->tm_sec, nsec);
217
+ tm->tm_hour, tm->tm_min, tm->tm_sec, (long)nsec);
218
218
  oj_dump_cstr(buf, len, 0, 0, out);
219
219
  }
220
220
 
@@ -272,8 +272,6 @@ oj_dump_wab_val(VALUE obj, int depth, Out out) {
272
272
  if (0 < type && type <= RUBY_T_FIXNUM) {
273
273
  DumpFunc f = wab_funcs[type];
274
274
 
275
- //printf("*** type %02x\n", type);
276
-
277
275
  if (NULL != f) {
278
276
  f(obj, depth, out, false);
279
277
  return;
@@ -402,8 +400,15 @@ time_parse(const char *s, int len) {
402
400
  return Qnil;
403
401
  }
404
402
  }
403
+ #if IS_WINDOWS
404
+ secs = (time_t)mktime(&tm);
405
+ memset(&tm, 0, sizeof(tm));
406
+ tm.tm_year = 70;
407
+ tm.tm_mday = 1;
408
+ secs -= (time_t)mktime(&tm);
409
+ #else
405
410
  secs = (time_t)timegm(&tm);
406
-
411
+ #endif
407
412
  return rb_funcall(rb_time_nano_new(secs, nsecs), oj_utc_id, 0);
408
413
  }
409
414
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '3.3.1'
4
+ VERSION = '3.3.2'
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.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-09 00:00:00.000000000 Z
11
+ date: 2017-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler