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

Immutable objects detected as mutable when immutable. #2630

Closed
envygeeks opened this issue Jan 13, 2016 · 4 comments
Closed

Immutable objects detected as mutable when immutable. #2630

envygeeks opened this issue Jan 13, 2016 · 4 comments

Comments

@envygeeks
Copy link

master warns about freezing mutable Object's but does not detect the frozen-string-literal: true comment leading to an invalid warning:

lib/forwardable/extended/version.rb:7:15: C: Freeze mutable object assigned to constants
    VERSION = "2.0.0"
              ^^^^^^^

2 files inspected, 4 offenses detected
jordon ~/development (master *) % pry
[1] pry(main)> Forwardable::Extended::VERSION.frozen?
=> true
@envygeeks envygeeks changed the title Mutable objects detected as immutable when mutable. Mutable objects detected as immutable when muted. Jan 13, 2016
@envygeeks envygeeks changed the title Mutable objects detected as immutable when muted. Immutable objects detected as mutable when immutable. Jan 13, 2016
@envygeeks
Copy link
Author

Wow, I was confused for a second. Either way the error is still valid.

@segiddins
Copy link
Contributor

Now that the frozen string literal stuff is in master, I can try and tackle this.

@envygeeks
Copy link
Author

Awesome, thanks!

@ghost
Copy link

ghost commented Apr 11, 2017

FYI: this is still a problem unless you set TargetRubyVersion

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

2 participants