Enabled frozen string literals (#1154)

* Enabled frozen string literals

* Update rubocop config

* Prefer string interpolation in simple cases

Co-Authored-By: Dylan Thacker-Smith <[email protected]>
This commit is contained in:
Mike Angell
2019-09-18 13:19:45 +10:00
committed by GitHub
co-authored by Dylan Thacker-Smith
parent 1dcad34b06
commit 0d26f05bb8
121 changed files with 379 additions and 150 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Liquid
class Error < ::StandardError
attr_accessor :line_number
@@ -5,7 +7,7 @@ module Liquid
attr_accessor :markup_context
def to_s(with_prefix = true)
str = ""
str = +""
str << message_prefix if with_prefix
str << super()
@@ -20,7 +22,7 @@ module Liquid
private
def message_prefix
str = ""
str = +""
str << if is_a?(SyntaxError)
"Liquid syntax error"
else