Skip to content
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

Updated constants #1531

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

sampersand
Copy link
Contributor

@sampersand sampersand commented Sep 20, 2023

This pr updates the toplevel constants type definitions, and introduces constants_test.rbs to add tests.

More specifically, the following changes were made:

  • The leading :: on all constant names was removed
  • CROSS_COMPILING is now true?.
  • RUBY_REVISION is now a String.

There were some difficulties with writing tests, though:

  • There's no way to test for DATA when using rake, as DATA is only defined if the entrypoint file has an __END__. I added __END__ to the end of constants_test.rbs though, so if you manually run the file it should work.
  • There's no way to test for CROSS_COMPILING's variations: You'd have to recompile ruby and check.

@sampersand sampersand marked this pull request as ready for review September 20, 2023 00:54
@soutaro soutaro added this to the RBS 3.3 milestone Sep 21, 2023
@soutaro soutaro added this pull request to the merge queue Sep 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 21, 2023
@soutaro soutaro added this pull request to the merge queue Sep 21, 2023
Merged via the queue into ruby:master with commit 619bbee Sep 21, 2023
@soutaro soutaro added the Released PRs already included in the released version label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

2 participants