rubocop / rubocop-capybara

Code style checking for Capybara files.
https://docs.rubocop.org/rubocop-capybara
MIT License
41 stars 8 forks source link

Use String#each_char instead of String#chars #101

Closed ydah closed 8 months ago

ydah commented 8 months ago

Fix: https://github.com/rubocop/rubocop-capybara/issues/100


Before submitting the PR make sure the following are checked:

bquorning commented 8 months ago

Maybe we should add https://github.com/rubocop/rubocop-rubycw to Gemfile. Would that have caught the issue earlier?

ydah commented 8 months ago

I checked this PR below and it looks like it doesn't support jruby.

bquorning commented 8 months ago

I mean, it’s weird if String#chars has a different API in CRuby and JRuby.

ydah commented 8 months ago

String#chars has a deprecated warning until Ruby 2.6, but the warning seems to have been removed in Ruby 2.7. However, the warning continues to appear in jruby.

pirj commented 8 months ago

Thanks!