mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
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:
co-authored by
Dylan Thacker-Smith
parent
1dcad34b06
commit
0d26f05bb8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user