pry -e now works using input_stack; should eliminate quirks and limitations in behavior
This commit is contained in:
parent
b053ee1571
commit
674e2c3f5d
7
bin/pry
7
bin/pry
|
@ -80,10 +80,7 @@ Pry.cli = true
|
||||||
# create the actual context
|
# create the actual context
|
||||||
context = Pry.binding_for(eval(opts[:context]))
|
context = Pry.binding_for(eval(opts[:context]))
|
||||||
|
|
||||||
|
exec_string = opts[:exec] || ""
|
||||||
# run code passed with `-e`, if there is any.
|
# run code passed with `-e`, if there is any.
|
||||||
if opts.exec?
|
Pry.start(context, :input => StringIO.new(exec_string + "\n"), :input_stack => [Readline])
|
||||||
Pry.new(:input => StringIO.new(opts[:exec]), :print => proc {}).rep(context)
|
|
||||||
end
|
|
||||||
|
|
||||||
# start the session
|
|
||||||
context.pry
|
|
||||||
|
|
Loading…
Reference in New Issue