diff options
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r-- | lib/json/common.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb index 8fbaa2b..f44184e 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -148,7 +148,7 @@ module JSON # the default. # * *create_additions*: If set to false, the Parser doesn't create # additions even if a matching class and create_id was found. This option - # defaults to true. + # defaults to false. # * *object_class*: Defaults to Hash # * *array_class*: Defaults to Array def parse(source, opts = {}) @@ -169,7 +169,7 @@ module JSON # to true. # * *create_additions*: If set to false, the Parser doesn't create # additions even if a matching class and create_id was found. This option - # defaults to true. + # defaults to false. def parse!(source, opts = {}) opts = { :max_nesting => false, @@ -390,7 +390,7 @@ module JSON end end opts = JSON.dump_default_options - limit and opts.update(:max_nesting => limit) + opts = opts.merge(:max_nesting => limit) if limit result = generate(obj, opts) if anIO anIO.write result @@ -411,7 +411,7 @@ module JSON string end - # Shortuct for iconv. + # Shortcut for iconv. if ::String.method_defined?(:encode) # Encodes string using Ruby's _String.encode_ def self.iconv(to, from, string) |