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
Closed

Struct#inspect has ASCII encoding #2182

obrok opened this issue Nov 12, 2014 · 1 comment

Comments

@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>
@k77ch7
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
@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
Projects
None yet
Development

No branches or pull requests

4 participants