Migrate all T::Enum usages to bare Ruby classes#843
Open
Conversation
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
ffdc7a5 to
5923f4b
Compare
T::Enum usages to bare Ruby classes
amomchilov
approved these changes
Jan 8, 2026
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
5923f4b to
40f6f84
Compare
paracycle
approved these changes
Jan 8, 2026
| when "protected" then Protected | ||
| when "private" then Private | ||
| else | ||
| raise Error, "Invalid visibility: #{name}" |
Member
There was a problem hiding this comment.
I think it might be better to raise ArgumentError here:
Suggested change
| raise Error, "Invalid visibility: #{name}" | |
| raise ArgumentError, "Invalid visibility: #{name}" |
| def yellow(string); end | ||
| end | ||
|
|
||
| Spoom::Cli::Helper::HIGHLIGHT_COLOR = T.let(T.unsafe(nil), Spoom::Color) |
Contributor
Author
There was a problem hiding this comment.
It should be definitely be here: https://github.com/Shopify/spoom/blob/main/lib/spoom/cli/helper.rb#L106.
I think it wasn't before because the constant was pointing to the enum variant instead of a real constant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also enable
Sorbet/ForbidTEnumcop after that.