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
1 changed files with 5 additions and 1 deletions

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