Skip to content

Class methods should be non enumerable #1874

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

Merged
merged 1 commit into from
Apr 9, 2015
Merged

Conversation

arv
Copy link
Collaborator

@arv arv commented Apr 8, 2015

Fixes #1873

@arv arv added the in progress label Apr 8, 2015
@arv
Copy link
Collaborator Author

arv commented Apr 8, 2015

@domenic PTAL


assert.isTrue(C.prototype.hasOwnProperty('0'));
assert.isTrue(C.prototype.hasOwnProperty('1'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change reduces coverage by allowing extra properties to sneak in. Maybe use gOPNs instead of O.keys?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had getOwnPropertyNames first but that includes arguments and caller which is wrong according to ES6.

@domenic
Copy link
Contributor

domenic commented Apr 9, 2015

LGTM with a test style nit. Interesting that we made getters nonenumerable.... Not sure I agree with that, but oh well.

Thanks so much for the quick response!

@arv arv merged commit a26657e into google:master Apr 9, 2015
@arv arv removed the in progress label Apr 9, 2015
@arv arv deleted the method-non-enum branch April 9, 2015 00:26
@johnjbarton
Copy link
Contributor

I double checked this PR should be in npm. Please let me know if that is not what you see.

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.

Class methods should be non-enumerable
3 participants