Project

General

Profile

Feature #12016 » patch_symbol_encoding_error_msg.diff

Patch which adjusts error message in sym_check_asciionly - alexdowad (Alex Dowad), 01/25/2016 06:13 AM

View differences:

symbol.c
if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE;
switch (rb_enc_str_coderange(str)) {
case ENC_CODERANGE_BROKEN:
rb_raise(rb_eEncodingError, "invalid encoding symbol");
rb_raise(rb_eEncodingError, "encoding %s is invalid for symbol :%s",
rb_enc_name(rb_enc_get(str)), RSTRING_PTR(rb_str_inspect(str)));
case ENC_CODERANGE_7BIT:
return TRUE;
}
(2-2/2)