Closed
Description
I'm seeing a new exception from the recently released 2.10.0.
To reproduce, put this in a script:
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "json", ENV.fetch("JSON_VERSION")
end
require "json"
puts({query: {match_all: {}}}.to_json(as_json: false))
Then run it:
$ JSON_VERSION=2.9.1 ruby json_bug.rb
{"query":{"match_all":{}}}
$ JSON_VERSION=2.10.0 ruby json_bug.rb
/Users/myron/.rvm/gems/ruby-3.3.4/gems/json-2.10.0/lib/json/ext/generator/state.rb:45:in `_configure': no implicit conversion of false into Proc (TypeError)
_configure(opts)
^^^^
from /Users/myron/.rvm/gems/ruby-3.3.4/gems/json-2.10.0/lib/json/ext/generator/state.rb:45:in `configure'
from /Users/myron/.rvm/gems/ruby-3.3.4/gems/json-2.10.0/lib/json/ext/generator/state.rb:27:in `initialize'
from json_bug.rb:10:in `new'
from json_bug.rb:10:in `to_json'
from json_bug.rb:10:in `<main>'
Metadata
Metadata
Assignees
Labels
No labels