Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/rubydex/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ static VALUE rdxr_graph_diagnostics(VALUE self) {
for (size_t i = 0; i < array->len; i++) {
DiagnosticEntry entry = array->items[i];
VALUE message = entry.message == NULL ? Qnil : rb_utf8_str_new_cstr(entry.message);
VALUE rule = rb_str_new2(entry.rule);
VALUE rule = rb_str_intern(rb_str_new2(entry.rule));
VALUE location = rdxi_build_location_value(entry.location);

VALUE kwargs = rb_hash_new();
Expand Down
4 changes: 2 additions & 2 deletions test/graph_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def test_indexing_with_parse_errors

assert_diagnostics(
[
{ rule: "parse-error", path: "file.rb", message: "expected an `end` to close the `class` statement" },
{ rule: "parse-error", path: "file.rb", message: "unexpected end-of-input, assuming it is closing the parent top level context" },
{ rule: :"parse-error", path: "file.rb", message: "expected an `end` to close the `class` statement" },
{ rule: :"parse-error", path: "file.rb", message: "unexpected end-of-input, assuming it is closing the parent top level context" },
],
graph.diagnostics,
)
Expand Down
Loading