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

Add new "String#chars" rule #870

Merged
merged 1 commit into from Mar 19, 2021
Merged

Conversation

koic
Copy link
Member

@koic koic commented Mar 19, 2021

Follow rubocop/rubocop#9615.

This PR adds "String#chars" rule.

# bad
string.split(//)
string.split('')

# good
string.chars

Follow rubocop/rubocop#9615.

This PR adds "String#chars" rule.

```ruby
# bad
string.split(//)
string.split('')

# good
string.chars
```
@koic koic force-pushed the add_new_string_chars_rule branch from 0760bea to 0fa0a30 Compare March 19, 2021 16:31
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks.

@bbatsov bbatsov merged commit 6d7a922 into rubocop:master Mar 19, 2021
@bbatsov
Copy link
Collaborator

bbatsov commented Mar 19, 2021

Thanks!

@koic koic deleted the add_new_string_chars_rule branch March 19, 2021 20:20
koic added a commit to rubocop/rubocop that referenced this pull request Mar 19, 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.

None yet

3 participants