chroma icon indicating copy to clipboard operation
chroma copied to clipboard

Fix Ruby 3.4 frozen string warnings in normalize_input

Open mavegaf opened this issue 5 months ago • 1 comments

Ruby 3.4 enables frozen string literals by default, which causes warnings when using destructive string methods (like strip! and downcase!) on frozen strings. This commit replaces the usage of input.clone.tap { |str| str.strip!; str.downcase! } with a non-mutating chain input.to_s.strip.downcase, which avoids mutating the original string and eliminates the warnings.

References:

  • Ruby issue: https://bugs.ruby-lang.org/issues/20205

mavegaf avatar Jul 01 '25 19:07 mavegaf

Any plans to review/merge this pull request?

jonh-favo avatar Aug 11 '25 06:08 jonh-favo