mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Remove #to_sym calls from Drop and Variable
Symbols are not needed here and using plain strings is nicer on Ruby
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@ module Liquid
|
||||
|
||||
# called by liquid to invoke a drop
|
||||
def invoke_drop(method_or_key)
|
||||
if method_or_key && method_or_key != EMPTY_STRING && self.class.public_method_defined?(method_or_key.to_s.to_sym)
|
||||
send(method_or_key.to_s.to_sym)
|
||||
if method_or_key && method_or_key != EMPTY_STRING && self.class.public_method_defined?(method_or_key.to_s)
|
||||
send(method_or_key.to_s)
|
||||
else
|
||||
before_method(method_or_key)
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ module Liquid
|
||||
if matches = f.match(/\s*(\w+)/)
|
||||
filtername = matches[1]
|
||||
filterargs = f.scan(/(?:#{FilterArgumentSeparator}|#{ArgumentSeparator})\s*(#{QuotedFragment})/o).flatten
|
||||
@filters << [filtername.to_sym, filterargs]
|
||||
@filters << [filtername, filterargs]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user