FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Ignore encoding when unmarshaling an Encoding by headius · Pull Request #9051 · jruby/jruby · GitHub

/ jruby Public

Ignore encoding when unmarshaling an Encoding - #9051

Merged
headius merged 1 commit into
jruby:masterfrom
headius:ignore_dumped_encoding_encoding
Oct 31, 2025
Merged

Ignore encoding when unmarshaling an Encoding#9051
headius merged 1 commit into
jruby:masterfrom
headius:ignore_dumped_encoding_encoding

Conversation

headius commented Oct 31, 2025

Copy link
Copy Markdown
Member

CRuby appears to marshal all Encoding objects with a special encoding instance variable indicating they have an encoding of US-ASCII, even though Encoding does not actually have an encoding. I've filed an issue about this for clarification below, but for now we ignore this peculiar situation.

https://bugs.ruby-lang.org/issues/21658

Fixes #9050

CRuby appears to marshal all Encoding objects with a special
encoding instance variable indicating they have an encoding of
US-ASCII, even though Encoding does not actually have an encoding.
I've filed an issue about this for clarification below, but for now
we ignore this peculiar situation.

https://bugs.ruby-lang.org/issues/21658

Fixes jruby#9050

headius commented Oct 31, 2025

Copy link
Copy Markdown
Member Author

Checked into TruffleRuby impl and they basically ignore encoding instance vars for object types that don't have encoding. CRuby rejects such classes outright, but has an exception for T_DATA that is an encoding object, so basically what we have here.

headius merged commit 89d3771 into jruby:master Oct 31, 2025
75 checks passed
headius deleted the ignore_dumped_encoding_encoding branch October 31, 2025 21:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marshal fails to load an encoding with an encoding ivar

1 participant


Back | FazBrowse Home | New Git URL