Get out of a loop in pry
Ever been caught in a loop while binding.pry
ing through a spec in RSpec? I have to admit I put myself in that situation far too many times before I learned how to get out of it properly. As it turns out it’s really easy to exit a loop in pry
… and without shutting down the Rails server.
exit!
If that syntax doesn’t suit your fancy, there are more ways to exit a loop in pry
, such as:
!!!
and
exit-program