Skip to content
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

0.36.0 Style/MutableConstant bug #2642

Closed
bwinter opened this issue Jan 15, 2016 · 3 comments
Closed

0.36.0 Style/MutableConstant bug #2642

bwinter opened this issue Jan 15, 2016 · 3 comments

Comments

@bwinter
Copy link

bwinter commented Jan 15, 2016

Just a heads up, found a bug in the new version:

1 error occurred:
An error occurred while Style/MutableConstant cop was inspecting /.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
Mention the following information in the issue report:
0.36.0 (using Parser 2.3.0.1, running on ruby 2.2.3 x86_64-linux)

For whatever reason we had:

CONSTANT ||= a_thing

And that appears to have confused 👮 considerably, leading to the error above.

@bbatsov
Copy link
Collaborator

bbatsov commented Jan 15, 2016

CONSTANT ||= a_thing

Apart from the bug, this is IMO an anti-pattern that we should probably discourage in a separate cop. If it's not known in advance it's not suitable to be a constant.

@bdangit
Copy link

bdangit commented Jan 15, 2016

when can this be merged?

@segiddins
Copy link
Contributor

This was merged via #2634

@bbatsov bbatsov closed this as completed Jan 17, 2016
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

No branches or pull requests

4 participants