[TxMt] Re: TextMate 1.5 and Ruby 2.0.0
Allan Odgaard
mailinglist at textmate.org
Wed Mar 6 22:13:24 UTC 2013
On Mar 6, 2013, at 20:21, Matt Neuburg <matt at tidbits.com> wrote:
> […] Ruby 2.0.0 is causing further trouble, on this line:
>
> io = IO.for_fd(ENV['TM_ERROR_FD'].to_i)
>
> This generates "Bad file descriptor".
What about this:
IO.for_fd(2) << "test\n"
Does that work?
If it works, try this code as well:
rd, wr = IO.pipe
fork do
io = IO.for_fd(wr.to_i)
io << "test\n"
io.close
end
puts rd.gets
> […] I don't know how TM_ERROR_FD is set or what might be wrong with it as a file descriptor (it's just a number).
It is setup by TextMate.executor and the number is the file descriptor which is the write-end of a pipe created.
More information about the textmate
mailing list