Skip to content

Commit

Permalink
Merge pull request #422 from BurdetteLamar/master
Browse files Browse the repository at this point in the history
Added :call-seq: to RDoc for some methods
  • Loading branch information
hsbt committed Jun 28, 2020
2 parents 3d1c6a9 + ee5b6a7 commit b20cdca
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/json/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ class MissingUnicodeSupport < JSONError; end

module_function

# :call-seq:
# JSON.parse(source, opts) -> object
#
# Argument +source+ contains the \String to be parsed. It must be a
# {String-convertible object}[doc/implicit_conversion_rdoc.html#label-String-Convertible+Objects]
# (implementing +to_str+), and must contain valid \JSON data.
Expand Down Expand Up @@ -260,6 +263,9 @@ def parse(source, opts = {})
Parser.new(source, **(opts||{})).parse
end

# :call-seq:
# JSON.parse!(source, opts) -> object
#
# Calls
# parse(source, opts)
# with +source+ and possibly modified +opts+.
Expand All @@ -276,6 +282,9 @@ def parse!(source, opts = {})
Parser.new(source, **(opts||{})).parse
end

# :call-seq:
# JSON.generate(obj, opts = nil) -> new_string
#
# Argument +obj+ is the Ruby object to be converted to \JSON.
#
# Argument +opts+, if given, contains options for the generation, and must be a
Expand Down Expand Up @@ -463,6 +472,9 @@ def fast_generate(obj, opts = nil)
module_function :fast_unparse
# :startdoc:

# :call-seq:
# JSON.pretty_generate(obj, opts = nil) -> new_string
#
# Arguments +obj+ and +opts+ here are the same as
# arguments +obj+ and +opts+ in JSON.generate.
#
Expand Down

0 comments on commit b20cdca

Please sign in to comment.