This fixes #125 by ensuring that we always check the return value from yajl_gen_* functions, and raise an exception when these functions return anything but yajl_gen_status_ok. In particular, we now will raise a Yajl::EncodeError when we attempt to encode a deeply nested array or hash (with a depth > YAJL_MAX_DEPTH).
…ch does not respond to :read. `Yajl::Encoder.new.encode` does not have the bug.
…ined method "has_key?" for nil:NilClass
…patibility with the json gem. #94