summaryrefslogtreecommitdiff
path: root/lib/json/common.rb
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2015-06-15 10:06:27 +0200
committerFlorian Frank <flori@ping.de>2015-06-15 10:06:27 +0200
commit6f907a9142e83141a2e01fdddfd18b2013244cd6 (patch)
tree9fa8f8571594f300a2f6038948c4e96842359ff6 /lib/json/common.rb
parent0ece7a0404cebb8fb2ce4e6110e70fd05fb48d6b (diff)
downloadjson-6f907a9142e83141a2e01fdddfd18b2013244cd6.tar.gz
Refactor tests and make pure parser green
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r--lib/json/common.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb
index f44184e..1215d41 100644
--- a/lib/json/common.rb
+++ b/lib/json/common.rb
@@ -3,12 +3,12 @@ require 'json/generic_object'
module JSON
class << self
- # If _object_ is string-like, parse the string and return the parsed result
- # as a Ruby data structure. Otherwise generate a JSON text from the Ruby
- # data structure object and return it.
+ # If _object_ is string-like, parse the string and return the parsed
+ # result as a Ruby data structure. Otherwise generate a JSON text from the
+ # Ruby data structure object and return it.
#
- # The _opts_ argument is passed through to generate/parse respectively. See
- # generate and parse for their documentation.
+ # The _opts_ argument is passed through to generate/parse respectively.
+ # See generate and parse for their documentation.
def [](object, opts = {})
if object.respond_to? :to_str
JSON.parse(object.to_str, opts)
@@ -138,8 +138,8 @@ module JSON
# _opts_ can have the following
# keys:
# * *max_nesting*: The maximum depth of nesting allowed in the parsed data
- # structures. Disable depth checking with :max_nesting => false. It defaults
- # to 100.
+ # structures. Disable depth checking with :max_nesting => false. It
+ # defaults to 100.
# * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
# to false.
@@ -161,9 +161,9 @@ module JSON
#
# _opts_ can have the following keys:
# * *max_nesting*: The maximum depth of nesting allowed in the parsed data
- # structures. Enable depth checking with :max_nesting => anInteger. The parse!
- # methods defaults to not doing max depth checking: This can be dangerous
- # if someone wants to fill up your stack.
+ # structures. Enable depth checking with :max_nesting => anInteger. The
+ # parse! methods defaults to not doing max depth checking: This can be
+ # dangerous if someone wants to fill up your stack.
# * *allow_nan*: If set to true, allow NaN, Infinity, and -Infinity in
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
# to true.