> What do you mean it mismatches?   Also what do you mean by self-checking?
> It passes all the unit tests for me.

I think he meant that it doesn't throw exceptions on error. This is
the
wrapper I used to make it conform with the provided tests:

class JSONParser
    def initialize
        @parser = JsonParser.new
    end

    def parse(text)
        rv = @parser.parse(text)
        if rv
            return rv.value
        else
            raise RuntimeError
        end
    end
end

Regards,
Thomas.