Permalink
Browse files

Cleanup

  • Loading branch information...
1 parent 71230de commit c3fa20b8d85c66bc2edd204411c0846b9f78ad31 @sferik sferik committed Mar 15, 2012
@@ -24,4 +24,4 @@ def process_options(options={})
end
end
-end
+end
@@ -5,7 +5,7 @@ module MultiJson
module Engines
class Nsjsonserialization < MultiJson::Engines::OkJson
ParseError = ::MultiJson::OkJson::Error
-
+
def self.decode(string, options = {})
string = string.read if string.respond_to?(:read)
data = string.dataUsingEncoding(NSUTF8StringEncoding)
@@ -28,7 +28,7 @@ def self.encode(object, options = {})
super(object, options)
end
end
-
+
end
end
end
@@ -1,13 +1,13 @@
-require 'oj' unless defined?(Oj)
+require 'oj' unless defined?(::Oj)
+
+::Oj.default_options = {:mode => :compat}
module MultiJson
module Engines
# Use the Oj library to encode/decode.
class Oj
ParseError = SyntaxError
- ::Oj.default_options = {:mode => :compat}
-
def self.decode(string, options = {}) #:nodoc:
::Oj.load(string, options)
end
@@ -1,4 +1,4 @@
-require "multi_json/vendor/ok_json"
+require 'multi_json/vendor/ok_json'
module MultiJson
module Engines
@@ -1,4 +1,4 @@
-require 'yajl' unless defined?(Yajl)
+require 'yajl' unless defined?(::Yajl)
module MultiJson
module Engines
@@ -584,4 +584,4 @@ class Error < ::StandardError
Unesc = {?b=>?\b, ?f=>?\f, ?n=>?\n, ?r=>?\r, ?t=>?\t}
Hex = '0123456789abcdef'
end
-end
+end

0 comments on commit c3fa20b

Please sign in to comment.