Low Ruby

Use frozen string literals

Rule Description

Add `# frozen_string_literal: true` to the top of Ruby files:
- Prevents accidental string mutation
- Improves memory usage and performance
- Catches bugs where strings are mutated unexpectedly

Configure RuboCop to enforce this automatically.

Included in Rulesets

Rails Standards
36 rules • 1 standard
View
Ruby Style Guide
25 rules • 1 standard
View
Code Review Standards
58 rules • 0 standards
View

Add This Rule

Sign in to add this rule to your workspace

Sign in with GitHub

Details

Severity
Low
Category
Ruby
Used in
3 rulesets