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

Produce a warning on private attribute accessors #2637

Merged
merged 1 commit into from Mar 3, 2015

Conversation

Projects
None yet
2 participants
@gsamokovarov
Copy link
Contributor

commented Mar 1, 2015

People seem to do that a lot after Sandi's book and not many of them
realize it actually produces a warning in CRuby.

Tried getting TestModule#test_attr out of the CRuby excluded failures,
because it was the only existing test I saw hinting of the behaviour,
however it also test that attribute names can't be a invalid
identifiers, which seems to go fine in JRuby.

Produce a warning on private attribute accessors
People seem to do that a lot after Sandi's book and not many of them
realize it actually produces a warning in CRuby.

Tried getting TestModule#test_attr out of the CRuby excluded failures,
because it was the only existing test I saw hinting of the behaviour,
however it also test that attribute names can't be a invalid
identifiers, which seems to go fine in JRuby.

@enebo enebo added this to the 9.0.0.0.pre2 milestone Mar 3, 2015

enebo added a commit that referenced this pull request Mar 3, 2015

Merge pull request #2637 from gsamokovarov/private-attrs
Produce a warning on private attribute accessors

@enebo enebo merged commit a90d9a8 into jruby:master Mar 3, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@enebo enebo added the core label Mar 3, 2015

kares added a commit to kares/jruby that referenced this pull request Jun 4, 2015

Don't warn on private attribute accessors to match CRuby
I'm sorry for the back and forth on this one. I introduced it back in
jruby#2637, but CRuby have recently removed the warning in
https://bugs.ruby-lang.org/issues/10967.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.