mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Fix more unused local variable warnings
This commit is contained in:
parent
992d21edb6
commit
efd0ed82d3
2 changed files with 3 additions and 2 deletions
|
@ -259,6 +259,7 @@ describe "show-source" do
|
||||||
class ::TestHost
|
class ::TestHost
|
||||||
def hello
|
def hello
|
||||||
hello = proc { ' smile ' }
|
hello = proc { ' smile ' }
|
||||||
|
_foo = hello
|
||||||
pry_tester(binding)
|
pry_tester(binding)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,14 +58,14 @@ describe "Sticky locals (_file_ and friends)" do
|
||||||
|
|
||||||
it 'locals should return last result (_)' do
|
it 'locals should return last result (_)' do
|
||||||
pry_tester.tap do |t|
|
pry_tester.tap do |t|
|
||||||
lam = t.eval 'lambda { |foo| }'
|
lam = t.eval 'lambda { |_foo| }'
|
||||||
t.eval('_').should == lam
|
t.eval('_').should == lam
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'locals should return second last result (__)' do
|
it 'locals should return second last result (__)' do
|
||||||
pry_tester.tap do |t|
|
pry_tester.tap do |t|
|
||||||
lam = t.eval 'lambda { |foo| }'
|
lam = t.eval 'lambda { |_foo| }'
|
||||||
t.eval 'num = 1'
|
t.eval 'num = 1'
|
||||||
t.eval('__').should == lam
|
t.eval('__').should == lam
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue