oj 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of oj might be problematic. Click here for more details.

data/README.md CHANGED
@@ -32,6 +32,11 @@ A fast JSON parser and Object marshaller as a Ruby gem.
32
32
 
33
33
  ## <a name="release">Release Notes</a>
34
34
 
35
+ ### Release 2.0.7
36
+
37
+ - Fixed bug where undefined classes specified in a JSON document would freeze Ruby instead of raising an exception when
38
+ the auto_define option was not set. (It seems that Ruby freezes on trying to add variables to nil.)
39
+
35
40
  ### Release 2.0.6
36
41
 
37
42
  - Worked around an undocumented feature in linux when using make that misreports the stack limits.
@@ -184,7 +184,10 @@ classname2class(const char *name, ParseInfo pi) {
184
184
  raise_error("Invalid classname, expected another ':'", pi->str, pi->s);
185
185
  }
186
186
  if (Qundef == (clas = resolve_classname(clas, class_name, auto_define))) {
187
- return Qundef;
187
+ char buf[1024];
188
+
189
+ snprintf(buf, sizeof(buf) - 1, "Class %s not defined", class_name);
190
+ raise_error(buf, pi->str, pi->s);
188
191
  }
189
192
  s = class_name;
190
193
  } else if (end <= s) {
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '2.0.6'
4
+ VERSION = '2.0.7'
5
5
  end
@@ -1,4 +1,25 @@
1
- require 'oj'
2
- puts Oj.load('{}')
3
1
 
2
+ require 'pp'
3
+ require 'oj'
4
4
 
5
+ pp Oj.load("{\"id\": 303628670768128001,
6
+ \"additionalType\":\"http://getfetcher.net/Item\",
7
+ \"description\":\"@DoMeuBieber :)) mas kra pode parando d fazer isso ainda mais por causa d mlk eu sei que no sua culpa mas vc pode evitar!\",
8
+ \"author\": {\"additionalType\":\"http://getfetcher.net/Item\",
9
+ \"id\":1054045717,
10
+ \"name\":\"i'm natriznator\",
11
+ \"dateRegistered\":{\"^t\":1357095124.000000000},
12
+ \"description\":\"menos falsidade e mais liberdade\",
13
+ \"url\":\"https://twitter.com/hotlov4to\"},
14
+ \"viewer\": {\"additionalType\":\"http://getfetcher.net/Item\",
15
+ \"id\":861875166,
16
+ \"name\":\"Fetcher Dev\",
17
+ \"dateRegistered\":{\"^t\":1349377226.000000000},
18
+ \"description\":null,
19
+ \"url\":\"https://twitter.com/FetcherDev\"},
20
+ \"dateCreated\": {\"^t\":1361225690.000000000},
21
+ \"provider\": [\"twitter\",
22
+ \"web\"],
23
+ \"url\": \"https://twitter.com/hotlov4to/status/303628670768128001\",
24
+ \"_id\": {\"^o\":\"BSON::ObjectId\",
25
+ \"data\":[81,34,167,251,70,246,92,80,135,0,0,1]}}", :auto_define => false)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: