Rename constant to RAISE_EXCEPTION_LAMBDA

This commit is contained in:
Ashwin Maroli
2020-10-28 23:06:13 +05:30
parent bb9cd4eb6a
commit 740f8759cc
3 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ module Liquid
TemplateParser = /(#{PartialTemplateParser}|#{AnyStartingTag})/om TemplateParser = /(#{PartialTemplateParser}|#{AnyStartingTag})/om
VariableParser = /\[[^\]]+\]|#{VariableSegment}+\??/o VariableParser = /\[[^\]]+\]|#{VariableSegment}+\??/o
EXCEPTION_RENDERER_LAMBDA = ->(_e) { raise } RAISE_EXCEPTION_LAMBDA = ->(_e) { raise }
singleton_class.send(:attr_accessor, :cache_classes) singleton_class.send(:attr_accessor, :cache_classes)
self.cache_classes = true self.cache_classes = true

View File

@@ -41,7 +41,7 @@ module Liquid
self.exception_renderer = Template.default_exception_renderer self.exception_renderer = Template.default_exception_renderer
if rethrow_errors if rethrow_errors
self.exception_renderer = Liquid::EXCEPTION_RENDERER_LAMBDA self.exception_renderer = Liquid::RAISE_EXCEPTION_LAMBDA
end end
# Do this last, since it could result in this object being passed to a Proc in the environment # Do this last, since it could result in this object being passed to a Proc in the environment

View File

@@ -153,7 +153,7 @@ module Liquid
c = args.shift c = args.shift
if @rethrow_errors if @rethrow_errors
c.exception_renderer = Liquid::EXCEPTION_RENDERER_LAMBDA c.exception_renderer = Liquid::RAISE_EXCEPTION_LAMBDA
end end
c c