8000 Fix error at Ruby CI by soutaro · Pull Request #2445 · ruby/rbs · GitHub
[go: up one dir, main page]

Skip to content

Fix error at Ruby CI #2445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add rb_raise call
  • Loading branch information
soutaro committed May 8, 2025
commit eb440db7f6d9f781deb001cf4f45bcc4e9c422d8
2 changes: 2 additions & 0 deletions ext/rbs_extension/ast_translation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,4 +1146,6 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
return ID2SYM(rb_intern3((const char *) constant->start, constant->length, ctx.encoding));
}
}

rb_raise(rb_eRuntimeError, "Unknown node type: %d", instance->type);
}
2 changes: 2 additions & 0 deletions templates/ext/rbs_extension/ast_translation.c.erb
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,6 @@ VALUE rbs_struct_to_ruby_value(rbs_translation_context_t ctx, rbs_node_t *instan
return ID2SYM(rb_intern3((const char *) constant->start, constant->length, ctx.encoding));
}
}

rb_raise(rb_eRuntimeError, "Unknown node type: %d", instance->type);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC reports warning: control reaches end of non-void function [-Wreturn-type] diagnostic here.

}
0