Skip to content

Commit

Permalink
RDoc enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
BurdetteLamar committed Jun 25, 2020
1 parent 470d909 commit ada48f0
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lib/json/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,6 @@ class MissingUnicodeSupport < JSONError; end
# Use class \Set:
# ruby = JSON.parse(source, {array_class: Set})
# ruby # => #<Set: {"foo", 1.0, true, false, nil}>
# Try class \Object:
# # Raises NoMethodError (undefined method `<<' for #<Object:>):
# JSON.parse(source, {array_class: Object})
# Bad value:
# # Raises TypeError (wrong argument type Symbol (expected Class)):
# JSON.parse(source, {array_class: :foo})
#
# ---
#
Expand All @@ -257,16 +251,6 @@ class MissingUnicodeSupport < JSONError; end
#
# ====== Exceptions
#
# Raises an exception if +source+ is not \String-convertible:
#
# # Raises TypeError (no implicit conversion of Symbol into String):
# JSON.parse(:foo)
#
# Raises an exception if +opts+ is not \Hash-convertible:
#
# # Raises TypeError (no implicit conversion of Symbol into Hash):
# JSON.parse(['foo'], :foo)
#
# Raises an exception if +source+ is not valid JSON:
#
# # Raises JSON::ParserError (783: unexpected token at ''):
Expand All @@ -277,7 +261,7 @@ def parse(source, opts = {})
end

# Calls
# JSON.parse(source, opts)
# parse(source, opts)
# with +source+ and possibly modified +opts+.
#
# Differences from JSON.parse:
Expand Down

0 comments on commit ada48f0

Please sign in to comment.