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

FIX #159 enum hash auto correct for % arrays #163

Merged

Conversation

ngouy
Copy link
Contributor

@ngouy ngouy commented Dec 3, 2019

update code and tests so autocorrect for enum hash handle % array notations such as
%w[done todo archived] are well corrected

@ngouy ngouy marked this pull request as ready for review December 3, 2019 01:36
def source(elem)
case elem.type
when :str
"\"#{elem.value}\""
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess String#dump is better than the string interpolation. String#dump returns eval-safe string.
Can you replace it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course ! Than you for this I tried to find a way to do so !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like the Symbol#inspect do exactly the same ! Replaced 👍

CHANGELOG.md Outdated Show resolved Hide resolved
@ngouy ngouy requested review from koic and pocke December 3, 2019 14:25
@koic
Copy link
Member

koic commented Dec 3, 2019

This looks good to me. Could you squash your commits into one?

@ngouy
Copy link
Contributor Author

ngouy commented Dec 3, 2019

👍 My bad, though it was during the merge / squash.

@ngouy ngouy force-pushed the FIX-enum-hash-auto-correct-for-percent-literals branch from 80857ed to 4d79291 Compare December 3, 2019 14:59
@koic koic merged commit 5707bb9 into rubocop:master Dec 3, 2019
@koic
Copy link
Member

koic commented Dec 3, 2019

Thanks!

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