Thanks for looking at where we can use #frozen_string_literal: true.
I think it's good to try this, but #frozen_string_literal: true should not be used as a cargo cult. So it would be good to know whether your patch leads to some/any speedups or not, or some other improvements.