Skip to content

[pull] master from ruby:master - #1389

Merged
pull[bot] merged 7 commits into
turkdevops:masterfrom
ruby:master
Sep 8, 2026
Merged

[pull] master from ruby:master#1389
pull[bot] merged 7 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 8, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

byroot and others added 7 commits September 8, 2026 07:06
I really wanted to get rid of this because the argument parsing is
awful and costly.

But `rdoc` has been using this positional argument for decades,
and while the fix has been merged, having to upgrade to the latest
rdoc is a bit too disruptive.

ruby/json@566bd7c108
…y 2.7.0 through 2.7.2

Since ruby/json@ebf0f29, `load_file` and `load_file!` forward their arguments to
`parse` and `parse!` with `...` after a leading parameter. Ruby 2.7 accepts `...` only on its own;
a leading parameter before it was added in Ruby 3.0 and reached the 2.7 series in 2.7.3, so on Ruby 2.7.0
through 2.7.2 requiring json 3.0 raises a `SyntaxError` at `lib/json/common.rb`, while the gemspec still allows
Ruby 2.7 as a whole.

`parse` and `parse!` take keyword arguments only, so forwarding `**options` passes exactly what `...` passed,
on every Ruby the gem supports.

A `method_missing` helper in the parser tests used the same form; it takes an anonymous splat now,
so the test suite itself loads on those versions.

Checked with `ruby -c` on Ruby 2.7.0, 2.7.2, 2.7.3, and 3.0.7, and with the test suite on Ruby 2.7.2 and 3.0.7.

ruby/json@29dad14674
@pull pull Bot locked and limited conversation to collaborators Sep 8, 2026
@pull pull Bot added the ⤵️ pull label Sep 8, 2026
@pull
pull Bot merged commit 847c5ce into turkdevops:master Sep 8, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants