From 58387ea2d7ad6b016d979c08fd0cb6caf7157a3f Mon Sep 17 00:00:00 2001 From: Keiji Yoshimi Date: Sat, 9 Feb 2019 12:09:53 +0900 Subject: [PATCH] fixed unused var warnings --- lib/stackprof/report.rb | 2 +- test/test_stackprof.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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]