T
Tanner Burson
------=_Part_46343_10383176.1130184959074
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I'm working through what seems like it should be a simple operation,
re-routing STDERR to point elsewhere. I can do the following
$stderr.reopen("/dev/null")
which works fine. But what I'd like to do is capture that output, so I
figured StringIO would be the way to go. According to the docs for IO#reope=
n
it can take an IO object as it's only parameter, and use that to re-open,
but when I do the following
require 'stringio'
str_io =3D StringIO.new
$stderr.reopen(str_io)
I get
TypeError: can't convert StringIO into String
any ideas? Is the documentation just wrong, and it can only take a string
arg? Or will it take only a File IO object?
--
=3D=3D=3DTanner Burson=3D=3D=3D
(e-mail address removed)
http://tannerburson.com <---Might even work one day...
------=_Part_46343_10383176.1130184959074--
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi,
I'm working through what seems like it should be a simple operation,
re-routing STDERR to point elsewhere. I can do the following
$stderr.reopen("/dev/null")
which works fine. But what I'd like to do is capture that output, so I
figured StringIO would be the way to go. According to the docs for IO#reope=
n
it can take an IO object as it's only parameter, and use that to re-open,
but when I do the following
require 'stringio'
str_io =3D StringIO.new
$stderr.reopen(str_io)
I get
TypeError: can't convert StringIO into String
any ideas? Is the documentation just wrong, and it can only take a string
arg? Or will it take only a File IO object?
--
=3D=3D=3DTanner Burson=3D=3D=3D
(e-mail address removed)
http://tannerburson.com <---Might even work one day...
------=_Part_46343_10383176.1130184959074--