diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2025-02-15 11:58:15 +1300 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-02-19 11:04:09 +0900 |
| commit | 68f0150ff0402746e0fee21a287aabf7d7900523 (patch) | |
| tree | 3bf58bee61aa91a8b47c93f4a246dd858f185853 | |
| parent | f423f6e10c0c226dfed98e7cb7a5d489191dfa35 (diff) | |
[ruby/json] Pass through all options if present.
https://github.com/ruby/json/commit/bea96e0a69
| -rw-r--r-- | ext/json/lib/json/common.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb index 005bac5c65..3f1e5ce969 100644 --- a/ext/json/lib/json/common.rb +++ b/ext/json/lib/json/common.rb @@ -840,7 +840,7 @@ module JSON 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 @@ module JSON 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 |
