Stderr and stdout in separate objects AND PTY

What are my practical options for popenX or net/ssh to have stderr,
stdout in separate objects while having PTY allocated?

If I use PTY module in ruby, stderr and stdout are from same File object.
If I request pty in net/ssh, stderr and stdout are from same object
(without requesting pty, in different).

···

--
++ytti