Commit 064b0b2
committed
Use
This commit addresses the `warning: literal string will be frozen in the future`
```$ ruby -v
ruby 3.4.0dev (2024-10-21T16:48:53Z master 5131fb5dbe) +PRISM [x86_64-linux]
$ RUBYOPT="--debug-frozen-string-literal" bundle exec rake test TEST=test/test_quiet_assets.rb
```
- Warnings addressed by this commit
```ruby
/path/to/sprockets-rails/lib/sprockets/rails/quiet_assets.rb:24: warning: literal string will be frozen in the future
/path/to/sprockets-rails/lib/sprockets/rails/quiet_assets.rb:23: info: the string was created here
```
- Sprockets Rails requires Ruby 2.5 that supports `<<~` (squiggly heredoc) introduced since Ruby 2.3.
https://www.ruby-lang.org/en/news/2015/12/25/ruby-2-3-0-released/
https://github.com/ruby/ruby/blob/d40ea2afa6ff5a6e5befcf342fb7b6dc58796b20/NEWS?plain=1#L53-L57
ruby/ruby#11893
- `--debug-frozen-string-literal` option has been introduced via ruby/ruby#11893<<~ (squiggly heredoc) to address warning: literal string will be frozen in the future
1 parent 2c04236 commit 064b0b2
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
0 commit comments