Skip to content

Use Ruby 3.1 shorthand kwargs syntax - #2671

Merged
ericproulx merged 1 commit into
masterfrom
ruby_3_1_shorthand_kwargs
Apr 6, 2026
Merged

Use Ruby 3.1 shorthand kwargs syntax#2671
ericproulx merged 1 commit into
masterfrom
ruby_3_1_shorthand_kwargs

Conversation

@ericproulx

@ericproulx ericproulx commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace redundant `key: key` kwargs with the shorthand `key:` form (Ruby 3.1+) across lib and spec files
  • Enforce the style going forward via a new RuboCop rule in `.rubocop.yml`
  • Pure readability improvement — no behavior change

Test plan

  • `bundle exec rspec` passes
  • `bundle exec rubocop` passes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@ericproulx
ericproulx force-pushed the ruby_3_1_shorthand_kwargs branch 4 times, most recently from 97bbc0f to f99f2e8 Compare April 5, 2026 22:04
@ericproulx
ericproulx requested a review from dblock April 5, 2026 22:07
Replace redundant `key: key` kwargs with the shorthand `key:` form
where the local variable name matches the keyword argument name.

Enforce the style through Rubocop

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ericproulx
ericproulx force-pushed the ruby_3_1_shorthand_kwargs branch from f99f2e8 to b09da71 Compare April 6, 2026 20:49
@ericproulx
ericproulx merged commit fe3b4f8 into master Apr 6, 2026
81 checks passed
@dblock
dblock deleted the ruby_3_1_shorthand_kwargs branch April 7, 2026 13:21
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.

2 participants