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

Renamed variable in oneOf to avoid name clash #221

Merged
merged 1 commit into from
Feb 23, 2015

Conversation

iainbeeston
Copy link
Contributor

I noticed in #216 that we have some bad variable naming. In the OneOf attribute, there's a validation_errors instance variable, but the parent (Attribute) class defines a validation_errors() method. So in the same file we have both a method and a variable with the same name. This seems to work, but it's confusing and seems like a bad idea.

This renames that variable to validation_error_count, to avoid confusion

@RST-J
Copy link
Contributor

RST-J commented Jan 22, 2015

👍

@RST-J RST-J mentioned this pull request Feb 8, 2015
@RST-J RST-J added this to the v2.5.1 milestone Feb 8, 2015
@RST-J RST-J mentioned this pull request Feb 8, 2015
6 tasks
@inglesp
Copy link

inglesp commented Feb 17, 2015

Looks good -- although Ruby is smart enough to distinguish between local variables and instance methods.

@iainbeeston
Copy link
Contributor Author

iainbeeston commented Feb 17, 2015 via email

@hoxworth
Copy link
Contributor

👍

RST-J added a commit that referenced this pull request Feb 23, 2015
Renamed variable in oneOf to avoid name clash
@RST-J RST-J merged commit beb5f37 into voxpupuli:master Feb 23, 2015
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.

4 participants