diff options
Diffstat (limited to 'lib/json/common.rb')
-rw-r--r-- | lib/json/common.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb index 7cc8529..3be9fd8 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -153,7 +153,7 @@ module JSON # * *object_class*: Defaults to Hash # * *array_class*: Defaults to Array def parse(source, opts = {}) - Parser.new(source, opts).parse + Parser.new(source, **(opts||{})).parse end # Parse the JSON document _source_ into a Ruby data structure and return it. @@ -176,7 +176,7 @@ module JSON :max_nesting => false, :allow_nan => true }.merge(opts) - Parser.new(source, opts).parse + Parser.new(source, **(opts||{})).parse end # Generate a JSON document from the Ruby data structure _obj_ and return |