Skip to content

Commit bea96e0

Browse files
committed
Pass through all options if present.
1 parent aa5b7d6 commit bea96e0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/json/common.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ def dump(obj, anIO = nil, limit = nil, kwargs = nil)
840840

841841
opts = JSON.dump_default_options
842842
opts = opts.merge(:max_nesting => limit) if limit
843-
opts = merge_dump_options(opts, **kwargs) if kwargs
843+
opts = opts.merge(kwargs) if kwargs
844844

845845
begin
846846
State.generate(obj, opts, anIO)
@@ -854,15 +854,6 @@ def self.iconv(to, from, string)
854854
string.encode(to, from)
855855
end
856856

857-
def merge_dump_options(opts, strict: NOT_SET)
858-
opts = opts.merge(strict: strict) if NOT_SET != strict
859-
opts
860-
end
861-
862-
class << self
863-
private :merge_dump_options
864-
end
865-
866857
# JSON::Coder holds a parser and generator configuration.
867858
#
868859
# module MyApp

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy