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

Struct#inspect has ASCII encoding #2182

Closed
obrok opened this Issue Nov 12, 2014 · 1 comment

Comments

Projects
None yet
4 participants
@obrok
Copy link

obrok commented Nov 12, 2014

On ruby 2.1 and 1.9:

irb(main):001:0> Struct.new(:a).new("ΆἅἇἈ").inspect
=> "#<struct a=\"ΆἅἇἈ\">"
irb(main):002:0> Struct.new(:a).new("ΆἅἇἈ").inspect.encoding
=> #<Encoding:UTF-8>

On jruby 1.7.16:

irb(main):001:0> Struct.new(:a).new("ΆἅἇἈ").inspect
=> "#<struct a=\"\xCE\x86\xE1\xBC\x85\xE1\xBC\x87\xE1\xBC\x88\">"
irb(main):002:0> Struct.new(:a).new("ΆἅἇἈ").inspect.encoding
=> #<Encoding:ASCII-8BIT>

@rtyler rtyler added the JRuby 1.7.x label Dec 9, 2014

@k77ch7

This comment has been minimized.

Copy link
Contributor

k77ch7 commented Dec 13, 2014

same result on current master

k77ch7 added a commit to k77ch7/jruby that referenced this issue Dec 15, 2014

k77ch7 added a commit to k77ch7/jruby that referenced this issue Dec 16, 2014

k77ch7 added a commit to k77ch7/jruby that referenced this issue Jan 14, 2015

k77ch7 added a commit to k77ch7/jruby that referenced this issue Feb 8, 2015

@mkristian mkristian closed this in 5879d5b Feb 9, 2015

enebo added a commit that referenced this issue Feb 9, 2015

@enebo enebo added this to the JRuby 1.7.20 milestone Apr 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.