pry/pry — pull request #1099 by vincentwoo (2014-01-20 16:09:37+00:00)
Title: patch non_interactive_mode to prevent double REPL layer

This commit fixes the issue wherein running a file `test.rb` with `pry -i test.rb` causes a second REPL to be run after the REPL created automatically to handle an exception caused by `test.rb` is closed.

vincents-air:pry vwoo$ pry -i ../test.rb

Exception: RuntimeError: lol
--
From: (pry) @ line 2 @ level: 0 of backtrace (of 21).

1: x = 1
=> 2: raise 'lol'
...exception encountered, going interactive!
[3] pry(main)> <-- hitting ctrl-d here
[1] pry(main)> <-- yields a second console instead of quitting

`test.rb`:

x = 1
raise 'lol'