Project

General

Profile

Feature #12016

More informative error message when Symbol encoding is invalid

Added by alexdowad (Alex Dowad) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:73398]

Description

When a symbol literal is invalid in the source file's encoding, an EncodingError exception is raised, with the following message: invalid encoding symbol. This patches the interpreter so a more informative message is generated, similar to:
encoding UTF-8 is invalid for symbol :"\xC7".

Here is where this originated from: https://github.com/whitequark/parser/issues/252


Files

patch_symbol_encoding_error_msg.diff (547 Bytes) patch_symbol_encoding_error_msg.diff alexdowad (Alex Dowad), 01/25/2016 06:13 AM
patch_symbol_encoding_error_msg.diff (547 Bytes) patch_symbol_encoding_error_msg.diff Patch which adjusts error message in sym_check_asciionly alexdowad (Alex Dowad), 01/25/2016 06:13 AM

Also available in: Atom PDF