Skip to content

Commit effca27

Browse files
dduuggbyroot
authored andcommitted
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.
1 parent 8bdd517 commit effca27

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/json/common.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,9 +812,9 @@ class Coder
812812
private_constant :EXCLUDED_GENERATOR_OPTIONS
813813

814814
# :call-seq:
815-
# JSON.new(options = nil, &block)
815+
# JSON::Coder.new(**options, &block)
816816
#
817-
# Argument +options+, if given, contains a \Hash of options for both parsing and generating.
817+
# Keyword arguments +options+, if given, are options for both parsing and generating.
818818
# See {Parsing Options}[rdoc-ref:JSON@Parsing+Options],
819819
# and {Generating Options}[rdoc-ref:JSON@Generating+Options].
820820
#

0 commit comments

Comments
 (0)