mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-29 15:15:19 -07:00
Use Object.const_get directly
This commit is contained in:
@@ -50,9 +50,7 @@ module Liquid
|
|||||||
private
|
private
|
||||||
|
|
||||||
def lookup_class(name)
|
def lookup_class(name)
|
||||||
names = name.split("::".freeze)
|
Object.const_get(name)
|
||||||
names.reject!(&:empty?)
|
|
||||||
names.reduce(Object) { |scope, const| scope.const_get(const) }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user