git-svn-id: file:///home/svn/incoming/trunk@2553 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-06-03 22:56:36 +00:00
parent eb092e67d4
commit 639158a1f5
1 changed files with 6 additions and 1 deletions

View File

@ -84,7 +84,7 @@ module Stream
# Writes data to the stream
#
def <<(buf)
return write(buf)
return write(buf.to_s)
end
#
@ -135,6 +135,11 @@ module Stream
# Read as much data as possible from the pipe
#
def get(timeout = def_read_timeout, ltimeout = def_read_loop_timeout, opts = {})
# For those people who are used to being able to use a negative timeout!
if (timeout < 0)
timeout = nil
end
# No data in the first place? bust.
if (!has_read_data?(timeout))
return nil