1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Default the redirect_pry_io helper's output to an anonymous StringIO.

This commit is contained in:
Eero Saynatkari 2011-09-09 02:49:11 +03:00
parent 85123ab81c
commit d200c8005c

View file

@ -52,7 +52,11 @@ def another_sample_method
:another_sample
end
def redirect_pry_io(new_in, new_out)
# Set I/O streams.
#
# Out defaults to an anonymous StringIO.
#
def redirect_pry_io(new_in, new_out = StringIO.new)
old_in = Pry.input
old_out = Pry.output