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 FalseClass, NilClass, and TrueClass #1478

Merged

Conversation

sampersand
Copy link
Contributor

@sampersand sampersand commented Aug 29, 2023

This primarily updates the unit tests for FalseClass, NilClass, and TrueClass to the newer system. It also:

  • Removed public from the beginning of definitions (it's redundant)
  • Removed def clone: (?freeze: true?) -> self, as that's defined on Kernel
  • Collapsed redundant branches ((nil) -> false | (false) -> false is now just (nil | false) -> false. I decided not to do (false?) -> false, as the nil variant's important for the method definition, and doesn't just indicate an absence of a value)
  • For NilClass, to_h now returns {}, not ::Hash[untyped, untyped]. It maintains parity with the other methods (eg def to_a: () -> [])

@sampersand sampersand marked this pull request as ready for review August 29, 2023 02:28
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

👏 👏 👏

@soutaro soutaro added this to the RBS 3.3 milestone Aug 29, 2023
@soutaro soutaro force-pushed the swesterman/23-08-28/cleanup-false-nil-and-true branch from beefe8f to 8faadbf Compare August 29, 2023 07:25
@soutaro soutaro enabled auto-merge August 29, 2023 07:26
@soutaro soutaro added this pull request to the merge queue Aug 29, 2023
Merged via the queue into ruby:master with commit 8ebc1b1 Aug 29, 2023
23 checks passed
@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