Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Avoid "warning: assigned but unused variable - hash"
Browse files Browse the repository at this point in the history
  • Loading branch information
mame committed Jan 8, 2021
1 parent a9aaf17 commit f9d2abb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/rspec/mocks/partial_double_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def call(name)
expect(object).to receive(:foobar).with(:key => "value").and_return(1)
# Use eval to avoid syntax error on 1.8 and 1.9
eval("expect(object.foobar(**hash[:a])).to equal(1)")
# Avoid warning: assigned but unused variable - hash
hash = hash
end
end

Expand Down

0 comments on commit f9d2abb

Please sign in to comment.