diff options
Diffstat (limited to 'lib/ffi_yajl')
-rw-r--r-- | lib/ffi_yajl/encoder.rb | 1 | ||||
-rw-r--r-- | lib/ffi_yajl/ffi/encoder.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/ffi_yajl/encoder.rb b/lib/ffi_yajl/encoder.rb index ea6c1d7..f742741 100644 --- a/lib/ffi_yajl/encoder.rb +++ b/lib/ffi_yajl/encoder.rb @@ -19,6 +19,7 @@ module FFI_Yajl # call either the ext or ffi hook str = do_yajl_encode(obj, yajl_gen_opts) str.force_encoding('UTF-8') if defined? Encoding + str end def self.encode(obj, *args) diff --git a/lib/ffi_yajl/ffi/encoder.rb b/lib/ffi_yajl/ffi/encoder.rb index 13fd7fb..1d54389 100644 --- a/lib/ffi_yajl/ffi/encoder.rb +++ b/lib/ffi_yajl/ffi/encoder.rb @@ -121,6 +121,7 @@ end class Bignum def ffi_yajl(yajl_gen, state) + puts "ENCODING BIGNUM" str = self.to_s if str == "NaN" || str == "Infinity" || str == "-Infinity" raise ::FFI_Yajl::EncodeError.new("'#{str}' is an invalid number") |