Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#merge
merge(opts)
ext/json/lib/json/ext/generator/state.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/json/lib/json/ext/generator/state.rb, line 23
def configure(opts)
unless opts.is_a?(Hash)
if opts.respond_to?(:to_hash)
opts = opts.to_hash
elsif opts.respond_to?(:to_h)
opts = opts.to_h
else
raise TypeError, "can't convert #{opts.class} into Hash"
end
end
_configure(opts)
end
Alias of #configure