Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changes

* Workaround another issue caused by conflicting versions of both `json_pure` and `json` being loaded.

### 2024-10-25 (2.7.4)

* Workaround a bug in 3.4.8 and older https://github.com/rubygems/rubygems/pull/6490.
Expand Down
7 changes: 6 additions & 1 deletion lib/json/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ def parse(source, opts = nil)
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

Expand Down
Loading