Permalink
Browse files

Invoke Pry if available

  • Loading branch information...
1 parent f5bcdcf commit 2ba74c67aa5785d320b849edf9a2068a91a8164d @omab omab committed Mar 28, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 bin/racksh
View
@@ -7,14 +7,21 @@ def STDOUT.reopen(*args); end
def STDERR.reopen(*args); end
if ARGV.empty?
- require "irb"
- require "irb/completion"
+ begin
+ require "pry"
+ Interpreter = Pry
+ rescue LoadError
+ require "irb"
+ require "irb/completion"
+ Interpreter = IRB
+ end
+
reloaded = false
loop do
pid = fork do
Rack::Shell.init(!reloaded)
ARGV.concat(['--prompt', 'simple']) unless ARGV.include?('--prompt')
- IRB.start
+ Interpreter.start
end
Process.wait(pid)
break unless $?.exitstatus == 255

0 comments on commit 2ba74c6

Please sign in to comment.