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

Rename methods on Faker::Types to avoid shadowing ruby standard methods #1198

Merged
merged 1 commit into from
May 17, 2018
Merged

Rename methods on Faker::Types to avoid shadowing ruby standard methods #1198

merged 1 commit into from
May 17, 2018

Conversation

MarcPer
Copy link
Contributor

@MarcPer MarcPer commented May 1, 2018

In particular, the class method hash, when shadowed, causes an error when Faker::Types is used as a hash key.

The issue is detailed in #1116.

@MarcPer
Copy link
Contributor Author

MarcPer commented May 1, 2018

The method name changes were as follows:

  • Faker::Types.hash => Faker::Types.rb_hash
  • Faker::Types.complex_hash => Faker::Types.complex_rb_hash
  • Faker::Types.integer => Faker::Types.rb_integer
  • Faker::Types.array => Faker::Types.rb_array
  • Faker::Types.string => Faker::Types.rb_string

@vbrazo
Copy link
Member

vbrazo commented May 17, 2018

Could you please rebase this branch with master, run rubocop and let me know when it's ready for review again? @MarcPer

In particular, the class method 'hash', when shadowed, causes an error
when Faker::Types is used as a hash key.
@coveralls
Copy link

coveralls commented May 17, 2018

Pull Request Test Coverage Report for Build 2133

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 99.64%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/faker/types.rb 11 13 84.62%
Files with Coverage Reduction New Missed Lines %
lib/faker/time.rb 7 100.0%
Totals Coverage Status
Change from base Build 2132: 0.0%
Covered Lines: 2214
Relevant Lines: 2222

💛 - Coveralls

@MarcPer
Copy link
Contributor Author

MarcPer commented May 17, 2018

Hey, @vbrazo. It's done.

@vbrazo vbrazo merged commit 99641b3 into faker-ruby:master May 17, 2018
@vbrazo vbrazo self-requested a review July 19, 2018 01:37
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
…ds (faker-ruby#1198)

In particular, the class method 'hash', when shadowed, causes an error
when Faker::Types is used as a hash key.
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.

3 participants