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

MatchData#offset returns byte offset instead of utf8 char offset for utf8 strings #2580

Open
jarkonik opened this issue May 31, 2023 · 0 comments · May be fixed by #2581
Open

MatchData#offset returns byte offset instead of utf8 char offset for utf8 strings #2580

jarkonik opened this issue May 31, 2023 · 0 comments · May be fixed by #2581
Labels
A-ruby-core Area: Ruby Core types. A-spec Area: ruby/spec infrastructure and completeness. C-bug Category: This is a bug.

Comments

@jarkonik
Copy link

ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux-gnu]:

irb(main):001:0> 'тест'.match('с').offset(0)
=> [2, 3]

artichoke trunk:

>>> 'тест'.match('с').offset(0)
=> [4, 5]
@jarkonik jarkonik linked a pull request May 31, 2023 that will close this issue
@lopopolo lopopolo added C-bug Category: This is a bug. A-ruby-core Area: Ruby Core types. A-spec Area: ruby/spec infrastructure and completeness. labels Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ruby-core Area: Ruby Core types. A-spec Area: ruby/spec infrastructure and completeness. C-bug Category: This is a bug.
Development

Successfully merging a pull request may close this issue.

2 participants