Skip to content

Commit

Permalink
[PRISM] Enable TestSyntax#test_error_message_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed May 17, 2024
1 parent 2d825ca commit 4ba0579
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion prism_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion test/.excludes-prism/TestSyntax.rb
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit 4ba0579

Please sign in to comment.