cleaned up some code in pry_instance.rb
This commit is contained in:
parent
a0045c5647
commit
8c9047b8db
|
@ -245,12 +245,11 @@ class Pry
|
||||||
# exit session if we receive EOF character (^D)
|
# exit session if we receive EOF character (^D)
|
||||||
if !val
|
if !val
|
||||||
output.puts
|
output.puts
|
||||||
if binding_stack.size == 1
|
if binding_stack.one?
|
||||||
|
|
||||||
# ^D at top-level breaks out of loop
|
# ^D at top-level breaks out of loop
|
||||||
|
binding_stack.clear
|
||||||
throw(:breakout)
|
throw(:breakout)
|
||||||
else
|
else
|
||||||
|
|
||||||
# otherwise just pops a binding
|
# otherwise just pops a binding
|
||||||
binding_stack.pop
|
binding_stack.pop
|
||||||
val = ""
|
val = ""
|
||||||
|
|
Loading…
Reference in New Issue