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

String#chop(UTF-8String) removes last byte, not character #2967

Closed
syohex opened this issue Sep 28, 2015 · 0 comments · Fixed by #2971
Closed

String#chop(UTF-8String) removes last byte, not character #2967

syohex opened this issue Sep 28, 2015 · 0 comments · Fixed by #2971

Comments

@syohex
Copy link
Contributor

syohex commented Sep 28, 2015

MRuby(enable MRB_UTF8_STRING)

% ./bin/mirb
mirb - Embeddable Interactive Ruby Shell

> a = "あいうえお"
 => "あいうえお"
> a.chop
 => "あいうえ\343\201"

CRuby

% irb
irb(main):001:0> a = "あいうえお"
=> "あいうえお"
irb(main):002:0> a.chop
=> "あいうえ"
mattn added a commit to mattn/mruby that referenced this issue Sep 29, 2015
@matz matz closed this as completed in #2971 Oct 1, 2015
matz added a commit that referenced this issue Oct 1, 2015
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 a pull request may close this issue.

1 participant