From cc58d303b6d9bf45398933c44201f5968c12f718 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Tue, 8 Sep 2026 22:15:04 -0700 Subject: [PATCH] Fix the JSON::Coder.new call-seq `JSON` has no `.new`, and options have been keyword arguments since 3.0, so passing a positional Hash raises ArgumentError. --- lib/json/common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/json/common.rb b/lib/json/common.rb index ebec553a..82d33406 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -812,9 +812,9 @@ class Coder private_constant :EXCLUDED_GENERATOR_OPTIONS # :call-seq: - # JSON.new(options = nil, &block) + # JSON::Coder.new(**options, &block) # - # Argument +options+, if given, contains a \Hash of options for both parsing and generating. + # Keyword arguments +options+, if given, are options for both parsing and generating. # See {Parsing Options}[rdoc-ref:JSON@Parsing+Options], # and {Generating Options}[rdoc-ref:JSON@Generating+Options]. #