[PRISM] Enable TestSyntax#test_error_message_encoding

This commit is contained in:
Kevin Newton 2024-05-17 09:45:08 -04:00
Родитель 2d825ca7d0
Коммит 4ba0579da6
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -9269,7 +9269,8 @@ pm_parse_process_error(const pm_parse_result_t *result)
}
}
VALUE error = rb_exc_new(rb_eSyntaxError, pm_buffer_value(&buffer), pm_buffer_length(&buffer));
VALUE message = rb_enc_str_new(pm_buffer_value(&buffer), pm_buffer_length(&buffer), result->node.encoding);
VALUE error = rb_exc_new_str(rb_eSyntaxError, message);
rb_encoding *filepath_encoding = result->node.filepath_encoding != NULL ? result->node.filepath_encoding : rb_utf8_encoding();
VALUE path = rb_enc_str_new((const char *) pm_string_source(filepath), pm_string_length(filepath), filepath_encoding);

Просмотреть файл

@ -1,5 +1,4 @@
exclude(:test_dedented_heredoc_continued_line, "heredoc line continuation dedent calculation")
exclude(:test_error_message_encoding, "syntax error message encoding")
exclude(:test_it, "https://github.com/ruby/prism/issues/2323")
exclude(:test_numbered_parameter, "should raise syntax error for numbered parameters in inner blocks")
exclude(:test_unterminated_heredoc_cr, "quoted \r heredoc terminators should not match \r\n")