Break out of REPL loop if binding_stack.empty?

Occasionally pry would go into a broken state where the binding_stack would be empty.
This commit breaks out of the REPL rather than leaving the user in a broken state.
This commit is contained in:
John Mair 2012-08-11 10:51:32 +12:00
parent 1234c90085
commit 997cd975b4
1 changed files with 1 additions and 0 deletions

View File

@ -228,6 +228,7 @@ class Pry
exception = catch(:raise_up) do
break_data = catch(:breakout) do
loop do
throw(:breakout) if binding_stack.empty?
rep(binding_stack.last)
end
end