From bea96e0a69cb53efbfc69e2a7134a184b39f957f Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Sat, 15 Feb 2025 11:58:15 +1300 Subject: [PATCH] Pass through all options if present. --- lib/json/common.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/json/common.rb b/lib/json/common.rb index 005bac5c..3f1e5ce9 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -840,7 +840,7 @@ def dump(obj, anIO = nil, limit = nil, kwargs = nil) opts = JSON.dump_default_options opts = opts.merge(:max_nesting => limit) if limit - opts = merge_dump_options(opts, **kwargs) if kwargs + opts = opts.merge(kwargs) if kwargs begin State.generate(obj, opts, anIO) @@ -854,15 +854,6 @@ def self.iconv(to, from, string) string.encode(to, from) end - def merge_dump_options(opts, strict: NOT_SET) - opts = opts.merge(strict: strict) if NOT_SET != strict - opts - end - - class << self - private :merge_dump_options - end - # JSON::Coder holds a parser and generator configuration. # # module MyApp