oj 2.5.4 → 2.5.5

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5ed2da87bfa647cc35c9f601be6ad196d55d383
4
- data.tar.gz: 10861e340f51bb1179829e04187115bf4c147370
3
+ metadata.gz: 75e4043274574e794d054c174097302ccb304834
4
+ data.tar.gz: 3088bfa698221df3861f69b262533c5e177c732b
5
5
  SHA512:
6
- metadata.gz: 96b24f234c6f96ea1744d5696dce1544e9be1c8c99d0c25343727cb1302c0097e5cd2425a6a04335f4d662862c557d6e02daff06568e2b0b03c630f6fd8f9787
7
- data.tar.gz: f87d369229b94e0ebaec6c2a8fffad056f1a41de63c108eacd4919166f743a74cb914622d2ac702bfe80511a029832c8247991ed896fdb61342341c776f12239
6
+ metadata.gz: 52c90ff21f5800a96ae30c48eb6fd7c3c4fb1c8c4fd643ae614c66ea94095e742651e716b1ffc7e8e818bc9d8522169dd7c6a50d13fca78e32113bc8be31bf38
7
+ data.tar.gz: 3d2371fcca9ff478b420292b3f6d6b4739dff8e45e25b8daa4a3d396ded515db17d19b87aa8c555c025d5d1f5437d52555379f2c2e9c66fcd535b1ac1cc26847
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Oj gem
2
2
  A fast JSON parser and Object marshaller as a Ruby gem.
3
3
 
4
- ## <a name="installation">Installation</a>
4
+ ## Installation
5
5
  gem install oj
6
6
 
7
- ## <a name="documentation">Documentation</a>
7
+ ## Documentation
8
8
 
9
9
  *Documentation*: http://www.ohler.com/oj
10
10
 
11
- ## <a name="source">Source</a>
11
+ ## Source
12
12
 
13
13
  *GitHub* *repo*: https://github.com/ohler55/oj
14
14
 
@@ -16,17 +16,22 @@ A fast JSON parser and Object marshaller as a Ruby gem.
16
16
 
17
17
  Follow [@peterohler on Twitter](http://twitter.com/#!/peterohler) for announcements and news about the Oj gem.
18
18
 
19
- ## <a name="build_status">Build Status</a>
19
+ ## Build Status
20
20
 
21
21
  [![Build Status](https://secure.travis-ci.org/ohler55/oj.png?branch=master)](http://travis-ci.org/ohler55/oj)
22
22
 
23
+ ### Current Release 2.5.5
24
+
25
+ - Worked around the Rubinius failure to load bigdecimal from a require within
26
+ the C code.
27
+
23
28
  ### Current Release 2.5.4
24
29
 
25
30
  - Fixed bug where unterminated JSON did not raise an exception.
26
31
 
27
32
  [Older release notes](http://www.ohler.com/dev/oj_misc/release_notes.html).
28
33
 
29
- ## <a name="description">Description</a>
34
+ ## Description
30
35
 
31
36
  Optimized JSON (Oj), as the name implies was written to provide speed optimized
32
37
  JSON handling. It was designed as a faster alternative to Yajl and other the
@@ -73,7 +78,7 @@ possible. The API is simple to use but does require a different approach than
73
78
  the conventional parse followed by access approach used by conventional JSON
74
79
  parsing.
75
80
 
76
- ## <a name="proper_use">Proper Use</a>
81
+ ## Proper Use
77
82
 
78
83
  Two settings in Oj are useful for parsing but do expose a vunerability if used from an untrusted source. Symbolizing
79
84
  keys can be used to cause memory to be filled up since Ruby does not garbage collect Symbols. The same is true for auto
@@ -88,9 +93,7 @@ methods on the Objects created. As in any system, check your inputs before worki
88
93
  from a user and evaluating it is never a good idea from an unsecure source. The same is true for Object attributes as
89
94
  they are not more than Strings. Always check inputs from untrusted sources.
90
95
 
91
- ## <a name="release">Release Notes</a>
92
-
93
- ### Simple JSON Writing and Parsing:
96
+ ## Simple JSON Writing and Parsing:
94
97
 
95
98
  ```ruby
96
99
  require 'oj'
@@ -114,7 +117,7 @@ puts "Same? #{h == h2}"
114
117
 
115
118
  # Links
116
119
 
117
- ## <a name="links">Performance Comparisons</a>
120
+ ## Performance Comparisons
118
121
 
119
122
  [Oj Strict Mode Performance](http://www.ohler.com/dev/oj_misc/performance_strict.html) compares Oj strict mode parser performance to other JSON parsers.
120
123
 
@@ -124,7 +127,7 @@ puts "Same? #{h == h2}"
124
127
 
125
128
  [Oj Callback Performance](http://www.ohler.com/dev/oj_misc/performance_callback.html) compares Oj callback parser performance to other JSON parsers.
126
129
 
127
- ## <a name="links">Links of Interest</a>
130
+ ## Links of Interest
128
131
 
129
132
  *Fast XML parser and marshaller on RubyGems*: https://rubygems.org/gems/ox
130
133
 
@@ -519,7 +519,7 @@ oj_parse_options(VALUE ropts, Options copts) {
519
519
  * true, false, or nil. It parses using a mode that is strict in that it maps
520
520
  * each primitive JSON type to a similar Ruby type. The :create_id is not
521
521
  * honored in this mode. Note that a Ruby Hash is used to represent the JSON
522
- * Object type. These two are not the same since teh JSON Object type can have
522
+ * Object type. These two are not the same since the JSON Object type can have
523
523
  * repeating entries with the same key and Ruby Hash can not.
524
524
  *
525
525
  * Raises an exception if the JSON is malformed or the classes specified are not
data/lib/oj.rb CHANGED
@@ -24,6 +24,14 @@
24
24
  module Oj
25
25
  end
26
26
 
27
+ begin
28
+ # This require exists to get around Rubinius failing to load bigdecimal from
29
+ # the C extension.
30
+ require 'bigdecimal'
31
+ rescue Exception
32
+ # ignore
33
+ end
34
+
27
35
  require 'oj/version'
28
36
  require 'oj/bag'
29
37
  require 'oj/error'
@@ -13,7 +13,7 @@ module Oj
13
13
  # @hash_cnt = 0
14
14
  # end
15
15
  #
16
- # def start_hash(key)
16
+ # def hash_start(key)
17
17
  # @hash_cnt += 1
18
18
  # end
19
19
  # end
@@ -14,7 +14,7 @@ module Oj
14
14
  # @hash_cnt = 0
15
15
  # end
16
16
  #
17
- # def start_hash()
17
+ # def hash_start()
18
18
  # @hash_cnt += 1
19
19
  # end
20
20
  # end
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Oj
3
3
  # Current version of the module.
4
- VERSION = '2.5.4'
4
+ VERSION = '2.5.5'
5
5
  end
@@ -11,7 +11,6 @@ $: << File.join(File.dirname(__FILE__), "../lib")
11
11
  $: << File.join(File.dirname(__FILE__), "../ext")
12
12
 
13
13
  require 'test/unit'
14
- require 'bigdecimal'
15
14
  require 'oj'
16
15
 
17
16
  $json1 = %{{
@@ -12,7 +12,6 @@ $: << File.join(File.dirname(__FILE__), "../lib")
12
12
  $: << File.join(File.dirname(__FILE__), "../ext")
13
13
 
14
14
  require 'test/unit'
15
- require 'bigdecimal'
16
15
  require 'oj'
17
16
 
18
17
  class Goo
@@ -11,7 +11,6 @@ $: << File.join(File.dirname(__FILE__), "../lib")
11
11
  $: << File.join(File.dirname(__FILE__), "../ext")
12
12
 
13
13
  require 'test/unit'
14
- require 'bigdecimal'
15
14
  require 'oj'
16
15
  require 'pp'
17
16
 
@@ -11,7 +11,6 @@ $: << File.join(File.dirname(__FILE__), "../lib")
11
11
  $: << File.join(File.dirname(__FILE__), "../ext")
12
12
 
13
13
  require 'test/unit'
14
- require 'bigdecimal'
15
14
  require 'oj'
16
15
  require 'pp'
17
16
 
@@ -13,7 +13,6 @@ $: << File.join(File.dirname(__FILE__), "../ext")
13
13
  require 'test/unit'
14
14
  require 'stringio'
15
15
  require 'date'
16
- require 'bigdecimal'
17
16
  require 'oj'
18
17
 
19
18
  class OjWriter < ::Test::Unit::TestCase
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: 2.5.4
4
+ version: 2.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-14 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'The fastest JSON parser and object serializer. '
14
14
  email: peter@ohler.com