New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style/MutableConstant
should be aware of # shareable_constant_value
(Ruby 3.0)
#9328
Comments
Here's a link to some documentation on the feature, https://docs.ruby-lang.org/en/3.0.0/doc/syntax/comments_rdoc.html#label-shareable_constant_value+Directive. https://bugs.ruby-lang.org/issues/17273 I hadn't heard of this being added before so I found it to be an interesting feature. It seems like the intent is to be used with Ractors |
That's one way to view it. The other way is the general position that constants should be immutable, and clearly when we say that we never mean actual classes. So in effect that is pretty much what "Ractor-shareable" means. |
I created #9410 to recognize shareable_constant_value in Style/MutableConstant |
[Fix rubocop#9328] Resolve review comments [Fix rubocop#9328] Removing nil check, refactoring spec [Fix rubocop#9328] Tests for code next to inline comments [Fix rubocop#9328] Move module to mutable_constant
[Fix rubocop#9328] Resolve review comments [Fix rubocop#9328] Removing nil check, refactoring spec [Fix rubocop#9328] Tests for code next to inline comments [Fix rubocop#9328] Move module to mutable_constant
The following should not generate an offense:
The text was updated successfully, but these errors were encountered: