Skip to content

Incompatibility with yajl introduced in json 2.11.0 #979

@weshatheleopard

Description

@weshatheleopard
> require 'json'; JSON::VERSION
=> "2.6.3"
> JSON["1"] # Works fine
=> 1
> require 'yajl/json_gem'
=> true
> JSON["1"] # Works fine
=> 1
> require 'yajl/version'; Yajl::VERSION
=> "1.4.3"

Whereas

> require 'json'; JSON::VERSION
=> "2.19.5"
> JSON["1"] # Works fine
=> 1
> require 'yajl/json_gem'
=> true
> JSON["1"] # Errs out
TypeError: wrong argument type nil (expected Hash)
from /[...]/.bundle/gems/ruby/3.3.0/gems/yajl-ruby-1.4.3/lib/yajl.rb:44:in `new'
> require 'yajl/version'; Yajl::VERSION
=> "1.4.3"

The problem was introduced in 2.11.0 by this change.

Yes, I do understand this is a highly unlikely circumstance... but we have quite obviously ran into it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions