diff options
Diffstat (limited to 'ext/json/lib/json/common.rb')
-rw-r--r-- | ext/json/lib/json/common.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb index 7cc852916c..3be9fd8dc5 100644 --- a/ext/json/lib/json/common.rb +++ b/ext/json/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 |