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
467 467
    if (!rb_enc_asciicompat(rb_enc_get(str))) return FALSE;
468 468
    switch (rb_enc_str_coderange(str)) {
469 469
      case ENC_CODERANGE_BROKEN:
470
	rb_raise(rb_eEncodingError, "invalid encoding symbol");
470
	rb_raise(rb_eEncodingError, "encoding %s is invalid for symbol :%s",
471
                 rb_enc_name(rb_enc_get(str)), RSTRING_PTR(rb_str_inspect(str)));
471 472
      case ENC_CODERANGE_7BIT:
472 473
	return TRUE;
473 474
    }