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#encode with undef replace options problem #881

Closed
seban opened this issue Jul 12, 2013 · 3 comments
Closed

String#encode with undef replace options problem #881

seban opened this issue Jul 12, 2013 · 3 comments
Milestone

Comments

@seban
Copy link

@seban seban commented Jul 12, 2013

I am now switching my app from old jruby-1.6.8 to new 1.7.4 but I have issue with String#encode method.

1.9.3p385 :003 > "Pojemność".encode(Encoding::US_ASCII, { :undef => :replace, :replace => ""})
 => "Pojemno"

2.0.0p247 :002 > "Pojemność".encode(Encoding::US_ASCII, { :undef => :replace, :replace => ""})
 => "Pojemno"

jruby-1.6.8 :001 >
jruby-1.6.8 :001 > "Pojemność".encode(Encoding::US_ASCII, { :undef => :replace, :replace => ""})
 => "Pojemno"

jruby-1.7.0 :001 > "Pojemność".encode(Encoding::US_ASCII, { :undef => :replace, :replace => ""})
 => "Pojemno??"

jruby-1.7.4 :001 > "Pojemność".encode(Encoding::US_ASCII, { :undef => :replace, :replace => ""})
 => "Pojemno??"

It looks like :replace option is totally not used in this method. Is it not supported in Jruby 1.7 branch or I just doing something wrong?

@lowang
Copy link

@lowang lowang commented Jul 12, 2013

problems is also visible in 1.7.1, 1.7.2 & 1.7.3

@headius
Copy link
Member

@headius headius commented Jul 12, 2013

Fixing.

@lowang
Copy link

@lowang lowang commented Jul 12, 2013

wow, thanks for super fast response 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants