Skip to content

Conversation

alpaca-tc
Copy link
Contributor

related: https://bugs.ruby-lang.org/issues/21528

This patch fixes an issue in IRB where it fails to handle a SyntaxError#message that has invalid encoding.

The root cause is that prism may generate a SyntaxError#message with broken encoding when the source contains multibyte characters. This patch ensures irb can handle such cases gracefully.

However, if this is considered a bug in Ruby itself, this pull request does not need to be merged.

related: https://bugs.ruby-lang.org/issues/21528

This patch fixes an issue in IRB where it fails to handle a `SyntaxError#message` that has invalid encoding.

The root cause is that prism may generate a `SyntaxError#message` with broken encoding when the source contains multibyte characters. This patch ensures irb can handle such cases gracefully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant