diff --git a/lib/stackprof/report.rb b/lib/stackprof/report.rb index 523646b3..71911bcc 100644 --- a/lib/stackprof/report.rb +++ b/lib/stackprof/report.rb @@ -42,7 +42,7 @@ def max_samples end def files - @data[:files] ||= @data[:frames].inject(Hash.new) do |hash, (addr, frame)| + @data[:files] ||= @data[:frames].inject(Hash.new) do |hash, (_addr, frame)| if file = frame[:file] and lines = frame[:lines] hash[file] ||= Hash.new lines.each do |line, weight| diff --git a/test/test_stackprof.rb b/test/test_stackprof.rb index 27da5c37..f6fe7e30 100644 --- a/test/test_stackprof.rb +++ b/test/test_stackprof.rb @@ -148,7 +148,6 @@ def test_gc end end - raw = profile[:raw] gc_frame = profile[:frames].values.find{ |f| f[:name] == "(garbage collection)" } assert gc_frame assert_equal gc_frame[:samples], profile[:gc_samples]