diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/json/lib/json/common.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/json/lib/json/common.rb b/ext/json/lib/json/common.rb index 182bb1c0e0..5f86360e02 100644 --- a/ext/json/lib/json/common.rb +++ b/ext/json/lib/json/common.rb @@ -219,7 +219,12 @@ module JSON if opts.nil? Parser.new(source).parse else - Parser.new(source, opts).parse + # NB: The ** shouldn't be required, but we have to deal with + # different versions of the `json` and `json_pure` gems being + # loaded concurrently. + # Prior to 2.7.3, `JSON::Ext::Parser` would only take kwargs. + # Ref: https://github.com/ruby/json/issues/650 + Parser.new(source, **opts).parse end end |