mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
Merge pull request #1117 from ashmaroli/reduce-allocations-template-lookup-class
Reduce allocations while registering Liquid tags
This commit is contained in:
@@ -50,7 +50,7 @@ module Liquid
|
||||
private
|
||||
|
||||
def lookup_class(name)
|
||||
name.split("::").reject(&:empty?).reduce(Object) { |scope, const| scope.const_get(const) }
|
||||
Object.const_get(name)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user