cleaned up some code in pry_instance.rb

This commit is contained in:
John Mair 2011-08-22 21:18:44 +12:00
parent a0045c5647
commit 8c9047b8db
1 changed files with 2 additions and 3 deletions

View File

@ -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 = ""