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

Use String#each_char instead of String#chars #101

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Use String#each_char instead of String#chars #101

merged 1 commit into from
Feb 2, 2024

Conversation

ydah
Copy link
Member

@ydah ydah commented Feb 1, 2024

Fix: #100


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with main (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • [-] Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

@ydah ydah requested a review from a team as a code owner February 1, 2024 14:02
@bquorning
Copy link
Contributor

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

@ydah
Copy link
Member Author

ydah commented Feb 1, 2024

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

@bquorning
Copy link
Contributor

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

@ydah
Copy link
Member Author

ydah commented Feb 1, 2024

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.

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.

RSpec’s own spec suite checks if there were any warnings, and fails if so.
That would be our option if we want to be warning-free.

@pirj pirj merged commit b5db9e1 into main Feb 2, 2024
25 checks passed
@pirj pirj deleted the use-each-char branch February 2, 2024 07:20
@pirj
Copy link
Member

pirj commented Feb 2, 2024

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.

Deprecation warning with JRuby
3 participants