From cb2ad71a317d802999c12ace9ecbcce76a46b28e Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Tue, 17 Nov 2020 13:24:35 -0500 Subject: [PATCH] Remove the Profiler#initialize argument which is effectively now unused The @root_timing Timing object that it was used with never exposed that name. --- lib/liquid/profiler.rb | 4 ++-- lib/liquid/template.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/liquid/profiler.rb b/lib/liquid/profiler.rb index cc5fadd..762aa8d 100644 --- a/lib/liquid/profiler.rb +++ b/lib/liquid/profiler.rb @@ -102,8 +102,8 @@ module Liquid attr_reader :total_render_time - def initialize(template_name) - @root_timing = Timing.new("", template_name) + def initialize + @root_timing = Timing.new("", nil) @timing_stack = [@root_timing] end diff --git a/lib/liquid/template.rb b/lib/liquid/template.rb index 3009c39..fe47623 100644 --- a/lib/liquid/template.rb +++ b/lib/liquid/template.rb @@ -220,7 +220,7 @@ module Liquid if @profiling && !context.partial raise "Profiler not loaded, require 'liquid/profiler' first" unless defined?(Liquid::Profiler) - @profiler = Profiler.new(context.template_name) + @profiler = Profiler.new @profiler.start begin