diff options
author | Josh Nichols <[email protected]> | 2023-08-21 21:41:06 -0700 |
---|---|---|
committer | git <[email protected]> | 2023-08-22 04:41:22 +0000 |
commit | 0955ca342ed01b61161e1a46015a58b54d2e7205 (patch) | |
tree | e1ca362f36beb3a392f87b05b22cc40503b9a179 /lib/erb/compiler.rb | |
parent | 925ce3f4fbe2f05b8673a6dbc763ecab9f04fae1 (diff) |
[ruby/erb] Enable frozen_string_literal in all files
(https://github.com/ruby/erb/pull/49)
I was surprised to see erb show up when I was using memory_profiler on
my app. ERB::Compiler#compile has a blank string literal, and it
ended up allocating some 41532 blank strings for a relatively small surface
area.
https://github.com/ruby/erb/commit/b7e45c2bdc
Diffstat (limited to 'lib/erb/compiler.rb')
-rw-r--r-- | lib/erb/compiler.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/erb/compiler.rb b/lib/erb/compiler.rb index 547d2c4c44..7096c8dcea 100644 --- a/lib/erb/compiler.rb +++ b/lib/erb/compiler.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true #-- # ERB::Compiler # |