Skip to content

Use Ruby 3.1 shorthand kwargs syntax#2671

Open
ericproulx wants to merge 2 commits intomasterfrom
ruby_3_1_shorthand_kwargs
Open

Use Ruby 3.1 shorthand kwargs syntax#2671
ericproulx wants to merge 2 commits intomasterfrom
ruby_3_1_shorthand_kwargs

Conversation

@ericproulx
Copy link
Copy Markdown
Contributor

Summary

  • Replace redundant key: key kwargs with the shorthand key: form (Ruby 3.1+) across 23 files
  • Pure readability improvement — no behavior change

Test plan

  • bundle exec rspec passes

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Danger Report

No issues found.

View run

Replace five specific exception classes (EmptyMessageBody, TooManyMultipartFiles,
TooDeepParameters, ConflictingTypes, InvalidParameters) with a single
Grape::Exceptions::RequestError that forwards the Rack exception message directly.

On Rack 3, a single `rescue Rack::BadRequest` covers all bad-request errors via
the marker module. On Rack 2, each exception class is listed explicitly in
Grape::RACK_ERRORS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ericproulx ericproulx force-pushed the ruby_3_1_shorthand_kwargs branch from 1ee65e2 to f3db28a Compare April 3, 2026 16:48
Replace redundant `key: key` kwargs with the shorthand `key:` form
where the local variable name matches the keyword argument name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ericproulx ericproulx force-pushed the ruby_3_1_shorthand_kwargs branch from f3db28a to 166d459 Compare April 3, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant