diff --git a/lib/liquid/block.rb b/lib/liquid/block.rb index a3c5f99..7358244 100644 --- a/lib/liquid/block.rb +++ b/lib/liquid/block.rb @@ -92,7 +92,7 @@ module Liquid end def block_delimiter - "end#{block_name}".freeze + "end#{block_name}" end def block_name diff --git a/lib/liquid/condition.rb b/lib/liquid/condition.rb index 9731236..bf025d9 100644 --- a/lib/liquid/condition.rb +++ b/lib/liquid/condition.rb @@ -61,7 +61,7 @@ module Liquid end def inspect - "#".freeze + "#" end private @@ -94,7 +94,7 @@ module Liquid left, right = context[left], context[right] - operation = self.class.operators[op] || raise(ArgumentError.new("Unknown operator #{op}".freeze)) + operation = self.class.operators[op] || raise(ArgumentError.new("Unknown operator #{op}")) if operation.respond_to?(:call) operation.call(self, left, right) diff --git a/lib/liquid/context.rb b/lib/liquid/context.rb index 525f9fe..7b49982 100644 --- a/lib/liquid/context.rb +++ b/lib/liquid/context.rb @@ -45,7 +45,7 @@ module Liquid def add_filters(filters) filters = [filters].flatten.compact filters.each do |f| - raise ArgumentError, "Expected module but got: #{f.class}".freeze unless f.is_a?(Module) + raise ArgumentError, "Expected module but got: #{f.class}" unless f.is_a?(Module) Strainer.add_known_filter(f) end @@ -82,9 +82,9 @@ module Liquid case e when SyntaxError - "Liquid syntax error: #{e.message}".freeze + "Liquid syntax error: #{e.message}" else - "Liquid error: #{e.message}".freeze + "Liquid error: #{e.message}" end end diff --git a/lib/liquid/file_system.rb b/lib/liquid/file_system.rb index ce44928..aa1b526 100644 --- a/lib/liquid/file_system.rb +++ b/lib/liquid/file_system.rb @@ -51,13 +51,13 @@ module Liquid def read_template_file(template_path, context) full_path = full_path(template_path) - raise FileSystemError, "No such template '#{template_path}'".freeze unless File.exists?(full_path) + raise FileSystemError, "No such template '#{template_path}'" unless File.exists?(full_path) File.read(full_path) end def full_path(template_path) - raise FileSystemError, "Illegal template name '#{template_path}'".freeze unless template_path =~ /^[^.\/][a-zA-Z0-9_\/]+$/ + raise FileSystemError, "Illegal template name '#{template_path}'" unless template_path =~ /^[^.\/][a-zA-Z0-9_\/]+$/ full_path = if template_path.include?('/'.freeze) File.join(root, File.dirname(template_path), @pattern % File.basename(template_path)) @@ -65,7 +65,7 @@ module Liquid File.join(root, @pattern % template_path) end - raise FileSystemError, "Illegal template path '#{File.expand_path(full_path)}'".freeze unless File.expand_path(full_path) =~ /^#{File.expand_path(root)}/ + raise FileSystemError, "Illegal template path '#{File.expand_path(full_path)}'" unless File.expand_path(full_path) =~ /^#{File.expand_path(root)}/ full_path end diff --git a/lib/liquid/module_ex.rb b/lib/liquid/module_ex.rb index fd18d4b..40fa3a4 100644 --- a/lib/liquid/module_ex.rb +++ b/lib/liquid/module_ex.rb @@ -43,7 +43,7 @@ class Module def liquid_methods(*allowed_methods) - drop_class = eval "class #{self.to_s}::LiquidDropClass < Liquid::Drop; self; end".freeze + drop_class = eval "class #{self.to_s}::LiquidDropClass < Liquid::Drop; self; end" define_method :to_liquid do drop_class.new(self) end diff --git a/lib/liquid/parser.rb b/lib/liquid/parser.rb index c485a0b..d2006f3 100644 --- a/lib/liquid/parser.rb +++ b/lib/liquid/parser.rb @@ -56,7 +56,7 @@ module Liquid consume(:dotdot) last = expression consume(:close_round) - "(#{first}..#{last})".freeze + "(#{first}..#{last})" else raise SyntaxError, "#{token} is not a valid expression" end @@ -70,7 +70,7 @@ module Liquid end str << expression - str.freeze + str end def variable_signature