Medium
Ruby
Use Ruby 3+ features
Official
Rule Description
Leverage modern Ruby features for cleaner code:
- Pattern matching: `case obj in { name:, age: } then ...`
- Endless methods: `def square(x) = x * x`
- Hash shorthand: `{ x:, y: }` instead of `{ x: x, y: y }`
- Numbered block parameters: `array.map { _1 * 2 }`
- Data classes for simple value objects
Keep Ruby version at 3.2+ for best performance and features.
Add This Rule
Sign in to add this rule to your workspace
Sign in with GitHubDetails
- Severity
- Medium
- Category
- Ruby
- Used in
- 3 rulesets