Skip to content

Conversation

@ydah
Copy link
Member

@ydah ydah commented Dec 8, 2025

This PR removes the .ruby-version file

Why

The goal is to prevent forcing a specific Ruby version on contributors. Developers should be able to work on this repository regardless of their local Ruby version.

Details

  • Previously, the Ruby version was pinned solely to address inconsistencies in hash syntax during documentation generation, not due to internal logic issues.
  • I believe pinning the version for this reason is not ideal.
  • With this change, documentation generation now produce consistent results without relying on a fixed Ruby version.
  • Contributors no longer need to worry about or strictly adhere to a specific Ruby version.

Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

@ydah ydah requested a review from a team as a code owner December 8, 2025 11:24
@ydah ydah force-pushed the dont-use-ruby-version branch 2 times, most recently from b474395 to 1641a34 Compare December 8, 2025 11:36
This PR removes the `.ruby-version` file

The goal is to prevent forcing a specific Ruby version on contributors. Developers should be able to work on this repository regardless of their local Ruby version.

* Previously, the Ruby version was pinned solely to address inconsistencies in hash syntax during documentation generation, not due to internal logic issues.
* I believe pinning the version for this reason is not ideal.
* With this change, documentation generation now produce consistent results without relying on a fixed Ruby version.
* Contributors no longer need to worry about or strictly adhere to a specific Ruby version.
@ydah ydah force-pushed the dont-use-ruby-version branch from 1641a34 to 3edcc98 Compare December 8, 2025 11:40
@bquorning
Copy link
Collaborator

I like this change, but shouldn't we see if we can make the patch in RuboCop instead? I imagine all of the RuboCop projects suffer from this Hash formatting issue.

@ydah
Copy link
Member Author

ydah commented Dec 15, 2025

Probably, but this issue doesn't occur in rubocop/rubocop. I haven't investigated why, but it seems like some kind of countermeasure has been implemented.

@bquorning bquorning merged commit ca18f5e into master Dec 15, 2025
27 checks passed
@bquorning bquorning deleted the dont-use-ruby-version branch December 15, 2025 22:43
@r7kamura
Copy link
Contributor

r7kamura commented Dec 31, 2025

The following pull requests were created earlier. While it only required a few changes in rubocop-rspec, the other three repositories required changes in many places.

I think we should apply this change to the other three as well to improve consistency. Otherwise, I'm concerned it will be a lot of work to manually update 4.0 to 4.1 in so many locations again when Ruby 4.1 is released. What do you think?

I believe it is a simple task since it just involves doing something similar, but the drawback is that every repository will end up containing a certain amount of workarounds. If you agree, I can handle all three tasks and submit the pull requests.

@bquorning
Copy link
Collaborator

Probably, but this issue doesn't occur in rubocop/rubocop. I haven't investigated why, but it seems like some kind of countermeasure has been implemented.

Actually it seems that this issue does occur in rubocop/rubocop:

❯ ruby -v
ruby 3.1.7p261 (2025-03-26 revision 0a3704f218) [arm64-darwin24]

❯ bundle exec rake update_cops_documentation
Files:         735
Modules:        99 (   14 undocumented)
Classes:       691 (    4 undocumented)
Constants:    1326 ( 1303 undocumented)
Attributes:     45 (    0 undocumented)
Methods:      1674 ( 1445 undocumented)
 27.87% documented
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_bundler.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_gemspec.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_layout.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_lint.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_metrics.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_migration.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_naming.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_security.adoc
* generated /Users/bquorning/Code/rubocop/rubocop/docs/modules/ROOT/pages/cops_style.adoc


❯ g diff | tail -n 6
 | PreferredMethods
-| `{"intern" => "to_sym"}`
+| `{"intern"=>"to_sym"}`
 | 
 |===

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