We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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
When marshalling and unmarshalling an UTF-8 regexp, I expect it to preserve its UTF-8 encoding
It looks like Marshal.load loses the encoding and turns the regexp into ASCII-8BIT:
r = /\brapidísimo\b/i # => /\brapidísimo\b/i p r.encoding # => #<Encoding:UTF-8> p m = Marshal.dump(r) # => "\x04\bI/\x14\\brapid\xC3\xADsimo\\b\x11\x06:\x06ET" p Marshal.load(m).encoding # => #<Encoding:ASCII-8BIT>
The text was updated successfully, but these errors were encountered:
Good find. Will investigate.
Sorry, something went wrong.
Looks at though we never implemented encoding replacement for Regexp. Working on that now.
c8d8226
Thanks for the quick response - appreciate! 👍
No branches or pull requests
Environment
Expected Behavior
When marshalling and unmarshalling an UTF-8 regexp, I expect it to preserve its UTF-8 encoding
Actual Behavior
It looks like Marshal.load loses the encoding and turns the regexp into ASCII-8BIT:
The text was updated successfully, but these errors were encountered: