pry -e now works using input_stack; should eliminate quirks and limitations in behavior

This commit is contained in:
John Mair 2011-09-16 16:20:41 +12:00
parent b053ee1571
commit 674e2c3f5d
1 changed files with 2 additions and 5 deletions

View File

@ -80,10 +80,7 @@ Pry.cli = true
# create the actual context
context = Pry.binding_for(eval(opts[:context]))
exec_string = opts[:exec] || ""
# run code passed with `-e`, if there is any.
if opts.exec?
Pry.new(:input => StringIO.new(opts[:exec]), :print => proc {}).rep(context)
end
Pry.start(context, :input => StringIO.new(exec_string + "\n"), :input_stack => [Readline])
# start the session
context.pry