mirror of
https://github.com/kemko/liquid.git
synced 2026-01-08 11:15:40 +03:00
Revert "Merge pull request #479 from Shopify/tweaks-for-c"
This reverts commitaa182f64b4, reversing changes made to70c45f8cd8.
This commit is contained in:
@@ -34,7 +34,7 @@ module Liquid
|
|||||||
return yield tag_name, markup
|
return yield tag_name, markup
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
raise_missing_tag_terminator(token, options)
|
raise SyntaxError.new(options[:locale].t("errors.syntax.tag_termination".freeze, :token => token, :tag_end => TagEnd.inspect))
|
||||||
end
|
end
|
||||||
when token.start_with?(VARSTART)
|
when token.start_with?(VARSTART)
|
||||||
new_var = create_variable(token, options)
|
new_var = create_variable(token, options)
|
||||||
@@ -117,14 +117,6 @@ module Liquid
|
|||||||
markup = token.is_a?(Token) ? token.child(content.first) : content.first
|
markup = token.is_a?(Token) ? token.child(content.first) : content.first
|
||||||
return Variable.new(markup, options)
|
return Variable.new(markup, options)
|
||||||
end
|
end
|
||||||
raise_missing_variable_terminator(token, options)
|
|
||||||
end
|
|
||||||
|
|
||||||
def raise_missing_tag_terminator(token, options)
|
|
||||||
raise SyntaxError.new(options[:locale].t("errors.syntax.tag_termination".freeze, :token => token, :tag_end => TagEnd.inspect))
|
|
||||||
end
|
|
||||||
|
|
||||||
def raise_missing_variable_terminator(token, options)
|
|
||||||
raise SyntaxError.new(options[:locale].t("errors.syntax.variable_termination".freeze, :token => token, :tag_end => VariableEnd.inspect))
|
raise SyntaxError.new(options[:locale].t("errors.syntax.variable_termination".freeze, :token => token, :tag_end => VariableEnd.inspect))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,17 +8,10 @@ profiler.run
|
|||||||
[:cpu, :object].each do |profile_type|
|
[:cpu, :object].each do |profile_type|
|
||||||
puts "Profiling in #{profile_type.to_s} mode..."
|
puts "Profiling in #{profile_type.to_s} mode..."
|
||||||
results = StackProf.run(mode: profile_type) do
|
results = StackProf.run(mode: profile_type) do
|
||||||
200.times do
|
100.times do
|
||||||
profiler.run
|
profiler.run
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if profile_type == :cpu && graph_filename = ENV['GRAPH_FILENAME']
|
|
||||||
File.open(graph_filename, 'w') do |f|
|
|
||||||
StackProf::Report.new(results).print_graphviz(nil, f)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
StackProf::Report.new(results).print_text(false, 20)
|
StackProf::Report.new(results).print_text(false, 20)
|
||||||
File.write(ENV['FILENAME'] + "." + profile_type.to_s, Marshal.dump(results)) if ENV['FILENAME']
|
File.write(ENV['FILENAME'] + "." + profile_type.to_s, Marshal.dump(results)) if ENV['FILENAME']
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user