Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
Showing with 24 additions and 17 deletions.
  1. +1 −0 .yardopts
  2. +14 −11 README.md
  3. +8 −0 lib/oj.rb
  4. +1 −1 lib/oj/version.rb
  5. +0 −1 test/test_fast.rb
  6. +0 −1 test/test_gc.rb
  7. +0 −1 test/test_saj.rb
  8. +0 −1 test/test_scp.rb
  9. +0 −1 test/test_writer.rb
View
1 .yardopts
@@ -0,0 +1 @@
+--title ""
View
25 README.md
@@ -1,32 +1,37 @@
# Oj gem
A fast JSON parser and Object marshaller as a Ruby gem.
-## <a name="installation">Installation</a>
+## Installation
gem install oj
-## <a name="documentation">Documentation</a>
+## Documentation
*Documentation*: http://www.ohler.com/oj
-## <a name="source">Source</a>
+## Source
*GitHub* *repo*: https://github.com/ohler55/oj
*RubyGems* *repo*: https://rubygems.org/gems/oj
Follow [@peterohler on Twitter](http://twitter.com/#!/peterohler) for announcements and news about the Oj gem.
-## <a name="build_status">Build Status</a>
+## Build Status
[![Build Status](https://secure.travis-ci.org/ohler55/oj.png?branch=master)](http://travis-ci.org/ohler55/oj)
+### Current Release 2.5.5
+
+ - Worked around the Rubinius failure to load bigdecimal from a require within
+ the C code.
+
### Current Release 2.5.4
- Fixed bug where unterminated JSON did not raise an exception.
[Older release notes](http://www.ohler.com/dev/oj_misc/release_notes.html).
-## <a name="description">Description</a>
+## Description
Optimized JSON (Oj), as the name implies was written to provide speed optimized
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
the conventional parse followed by access approach used by conventional JSON
parsing.
-## <a name="proper_use">Proper Use</a>
+## Proper Use
Two settings in Oj are useful for parsing but do expose a vunerability if used from an untrusted source. Symbolizing
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
from a user and evaluating it is never a good idea from an unsecure source. The same is true for Object attributes as
they are not more than Strings. Always check inputs from untrusted sources.
-## <a name="release">Release Notes</a>
-
-### Simple JSON Writing and Parsing:
+## Simple JSON Writing and Parsing:
```ruby
require 'oj'
@@ -114,7 +117,7 @@ puts "Same? #{h == h2}"
# Links
-## <a name="links">Performance Comparisons</a>
+## Performance Comparisons
[Oj Strict Mode Performance](http://www.ohler.com/dev/oj_misc/performance_strict.html) compares Oj strict mode parser performance to other JSON parsers.
@@ -124,7 +127,7 @@ puts "Same? #{h == h2}"
[Oj Callback Performance](http://www.ohler.com/dev/oj_misc/performance_callback.html) compares Oj callback parser performance to other JSON parsers.
-## <a name="links">Links of Interest</a>
+## Links of Interest
*Fast XML parser and marshaller on RubyGems*: https://rubygems.org/gems/ox
View
8 lib/oj.rb
@@ -24,6 +24,14 @@
module Oj
end
+begin
+ # This require exists to get around Rubinius failing to load bigdecimal from
+ # the C extension.
+ require 'bigdecimal'
+rescue Exception
+ # ignore
+end
+
require 'oj/version'
require 'oj/bag'
require 'oj/error'
View
2 lib/oj/version.rb
@@ -1,5 +1,5 @@
module Oj
# Current version of the module.
- VERSION = '2.5.4'
+ VERSION = '2.5.5'
end
View
1 test/test_fast.rb
@@ -11,7 +11,6 @@
$: << File.join(File.dirname(__FILE__), "../ext")
require 'test/unit'
-require 'bigdecimal'
require 'oj'
$json1 = %{{
View
1 test/test_gc.rb
@@ -12,7 +12,6 @@
$: << File.join(File.dirname(__FILE__), "../ext")
require 'test/unit'
-require 'bigdecimal'
require 'oj'
class Goo
View
1 test/test_saj.rb
@@ -11,7 +11,6 @@
$: << File.join(File.dirname(__FILE__), "../ext")
require 'test/unit'
-require 'bigdecimal'
require 'oj'
require 'pp'
View
1 test/test_scp.rb
@@ -11,7 +11,6 @@
$: << File.join(File.dirname(__FILE__), "../ext")
require 'test/unit'
-require 'bigdecimal'
require 'oj'
require 'pp'
View
1 test/test_writer.rb
@@ -13,7 +13,6 @@
require 'test/unit'
require 'stringio'
require 'date'
-require 'bigdecimal'
require 'oj'
class OjWriter < ::Test::Unit::TestCase

No commit comments for this range

Something went wrong with that request. Please try again.