Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed assigned but unused var warnings #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/stackprof/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
1 change: 0 additions & 1 deletion test/test_stackprof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down