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

Extract constants in Faker::Music #1874

Merged
merged 1 commit into from
Dec 26, 2019

Conversation

jas14
Copy link
Contributor

@jas14 jas14 commented Dec 25, 2019

No-Story

Description:

This PR pulls arrays out of methods in Faker::Music into constants in the same class. It's a follow-up to #1873 (comment).

This technically does change behavior, as the arrays returned by these methods are now frozen and modifications on them will throw exceptions; for example, the following did not previously throw an exception but now will:

arr = Faker::Music.keys
arr.sort!

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@vbrazo vbrazo merged commit 5850932 into faker-ruby:master Dec 26, 2019
michebble pushed a commit to michebble/faker that referenced this pull request Feb 16, 2020
davidmorton0 pushed a commit to davidmorton0/faker that referenced this pull request Jul 12, 2021
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.

2 participants