oj 1.2.7 → 1.2.8
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 +4 -6
- data/ext/oj/extconf.rb +6 -5
- data/ext/oj/load.c +5 -0
- data/ext/oj/oj.c +3 -0
- data/lib/oj.rb +1 -1
- data/lib/oj/version.rb +1 -1
- metadata +3 -4
data/README.md
CHANGED
@@ -24,13 +24,11 @@ A fast JSON parser and Object marshaller as a Ruby gem.
|
|
24
24
|
|
25
25
|
## <a name="release">Release Notes</a>
|
26
26
|
|
27
|
-
### Release 1.2.
|
27
|
+
### Release 1.2.8
|
28
28
|
|
29
|
-
-
|
29
|
+
- Included a contribution by nevans to fix a math.h issue with an old fedora linux machine.
|
30
30
|
|
31
|
-
-
|
32
|
-
|
33
|
-
- Added support for OS X Ruby 1.8.7.
|
31
|
+
- Included a fix to the documentation found by mat.
|
34
32
|
|
35
33
|
## <a name="description">Description</a>
|
36
34
|
|
@@ -40,7 +38,7 @@ other the common Ruby JSON parsers. So far is has achieved that at about 2
|
|
40
38
|
time faster than Yajl for parsing and 3 or more times faster writing JSON.
|
41
39
|
|
42
40
|
Oj has several dump or serialization modes which control how Objects are
|
43
|
-
converted to JSON. These modes are set with the :
|
41
|
+
converted to JSON. These modes are set with the :mode option in either the
|
44
42
|
default options or as one of the options to the dump() method.
|
45
43
|
|
46
44
|
- :strict mode will only allow the 7 basic JSON types to be serialized. Any other Object
|
data/ext/oj/extconf.rb
CHANGED
@@ -16,12 +16,13 @@ dflags = {
|
|
16
16
|
'RUBY_VERSION_MAJOR' => version[0],
|
17
17
|
'RUBY_VERSION_MINOR' => version[1],
|
18
18
|
'RUBY_VERSION_MICRO' => version[2],
|
19
|
-
'HAS_RB_TIME_TIMESPEC' => ('ruby' == type && '1.9.3' == RUBY_VERSION) ? 1 : 0,
|
20
|
-
'HAS_ENCODING_SUPPORT' => (('ruby' == type || 'rubinius' == type) &&
|
21
|
-
|
19
|
+
'HAS_RB_TIME_TIMESPEC' => ('ruby' == type && ('1.9.3' == RUBY_VERSION || '2' <= version[0])) ? 1 : 0,
|
20
|
+
'HAS_ENCODING_SUPPORT' => (('ruby' == type || 'rubinius' == type) &&
|
21
|
+
(('1' == version[0] && '9' == version[1]) || '2' <= version[0])) ? 1 : 0,
|
22
|
+
'HAS_NANO_TIME' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
|
22
23
|
'HAS_RSTRUCT' => ('ruby' == type || 'ree' == type) ? 1 : 0,
|
23
|
-
'HAS_IVAR_HELPERS' => ('ruby' == type && '1' == version[0] && '9' == version[1]
|
24
|
-
'HAS_PROC_WITH_BLOCK' => ('ruby' == type && '1' == version[0] && '9' == version[1]) ? 1 : 0,
|
24
|
+
'HAS_IVAR_HELPERS' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
|
25
|
+
'HAS_PROC_WITH_BLOCK' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
|
25
26
|
'HAS_TOP_LEVEL_ST_H' => ('ree' == type || ('ruby' == type && '1' == version[0] && '8' == version[1])) ? 1 : 0,
|
26
27
|
}
|
27
28
|
# This is a monster hack to get around issues with 1.9.3-p0 on CentOS 5.4. SO
|
data/ext/oj/load.c
CHANGED
data/ext/oj/oj.c
CHANGED
@@ -727,6 +727,9 @@ define_mimic_json(VALUE self) {
|
|
727
727
|
VALUE ext;
|
728
728
|
VALUE dummy;
|
729
729
|
|
730
|
+
if (rb_const_defined_at(rb_cObject, rb_intern("JSON"))) {
|
731
|
+
rb_raise(rb_eTypeError, "JSON module already exists. Can not mimic. Do not require 'json' before calling mimic_JSON.");
|
732
|
+
}
|
730
733
|
mimic = rb_define_module("JSON");
|
731
734
|
ext = rb_define_module_under(mimic, "Ext");
|
732
735
|
dummy = rb_define_class_under(ext, "Parser", rb_cObject);
|
data/lib/oj.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# optimized JSON handling.
|
3
3
|
#
|
4
4
|
# Oj has several dump or serialization modes which control how Objects are
|
5
|
-
# converted to JSON. These modes are set with the :
|
5
|
+
# converted to JSON. These modes are set with the :mode option in either the
|
6
6
|
# default options or as one of the options to the dump() method.
|
7
7
|
#
|
8
8
|
# - :strict mode will only allow the 7 basic JSON types to be serialized. Any other Object
|
data/lib/oj/version.rb
CHANGED
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: 1.2.
|
4
|
+
version: 1.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'The fastest JSON parser and object serializer. '
|
15
15
|
email: peter@ohler.com
|
@@ -83,9 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project: oj
|
86
|
-
rubygems_version: 1.8.
|
86
|
+
rubygems_version: 1.8.23
|
87
87
|
signing_key:
|
88
88
|
specification_version: 3
|
89
89
|
summary: A fast JSON parser and serializer.
|
90
90
|
test_files: []
|
91
|
-
has_rdoc: true
|