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

Marshal.load returns escaped non-ascii characters in symbols #1530

Closed
deepj opened this issue Dec 18, 2018 · 3 comments
Closed

Marshal.load returns escaped non-ascii characters in symbols #1530

deepj opened this issue Dec 18, 2018 · 3 comments
Assignees
Milestone

Comments

@deepj
Copy link

deepj commented Dec 18, 2018

I know, a bit weird to use non-ascii characters in symbols but MRI returns an expected result.

MRI (2.5.3):

irb(main):001:0> a = [:â]
=> [:â]
irb(main):002:0> Marshal.load(Marshal.dump(a))
=> [:â]

TruffleRuby (1.0.0-rc10):

irb(main):001:0> a = [:â]
=> [:"â"]
irb(main):002:0> Marshal.load(Marshal.dump(a))
=> [:"\xC3\xA2"]
@eregon
Copy link
Member

eregon commented Dec 19, 2018

This bug is inherited from Rubinius's marshal.rb. Should be relatively easy to fix.

@eregon eregon added this to the 1.0.0-rc11 milestone Dec 19, 2018
@dougxc dougxc closed this as completed in c5c1574 Dec 19, 2018
@eregon
Copy link
Member

eregon commented Dec 19, 2018

Fixed in 2f4ba36 and added specs for it as well as for serializing objects with multibyte instance variable names. It will be in the next release.

@eregon
Copy link
Member

eregon commented Jan 15, 2019

@deepj This is fixed in the new 1.0.0 RC 11 release, and verifying from IRB looks good. Please comment here if you're still seeing a problem.

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

2 participants