Skip to content

Conversation

@mitchellhenke
Copy link
Contributor

🛠 Summary of changes

Update to Ruby 3.2.0!

Nokogiri is the remaining piece that's still a release candidate, but I think we could consider moving forward with it if we're comfortable.

@aduth
Copy link
Contributor

aduth commented Jan 6, 2023

🙃

find app spec -name '*.rb' | xargs perl -pi -e "s/\(([a-z_]+): \1\)/(\1:)/"

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch 8 times, most recently from 109b2ba to 0cc0fd3 Compare January 10, 2023 16:58
@mitchellhenke mitchellhenke marked this pull request as ready for review January 10, 2023 17:25
@mitchellhenke
Copy link
Contributor Author

mitchellhenke commented Jan 10, 2023

🙃

find app spec -name '*.rb' | xargs perl -pi -e "s/\(([a-z_]+): \1\)/(\1:)/"

Happy to explore it in a future PR if 3.2 works 😀

For explicitness, the substitution is to make use of some syntax changes for hashes and keyword arguments released in Ruby 3.1:

  • {x:, y:} is syntax sugar for {x: x, y: y}.
  • foo(x:, y:) is syntax sugar for foo(x: x, y: y).

@aduth
Copy link
Contributor

aduth commented Jan 10, 2023

Happy to explore it in a future PR if 3.2 works 😀

Yep, totally fair. After I posted the comment, I also realized there's likely a Rubocop cop which can enforce / fix this for us, probably more reliable than command-line substitution.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Gemfile Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the PR has been merged, so I switched back to their repo in our Gemfile

@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch 2 times, most recently from 45fa4fa to 3d0d1c6 Compare January 11, 2023 16:32
@kbighorse kbighorse mentioned this pull request Jan 11, 2023
@mitchellhenke mitchellhenke force-pushed the mitchellhenke/ruby-3.1 branch from 3d0d1c6 to c82dac5 Compare January 11, 2023 22:15
@mitchellhenke mitchellhenke merged commit e0a66ca into main Jan 11, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/ruby-3.1 branch January 11, 2023 22:44
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.

4 participants