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:
parent
85123ab81c
commit
d200c8005c
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue