[MacRuby-devel] [MacRuby] #754: TCP socket is disconnected when used IO#gets and IO#puts.
MacRuby
ruby-noreply at macosforge.org
Fri Jul 2 11:00:12 PDT 2010
#754: TCP socket is disconnected when used IO#gets and IO#puts.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Comment(by watson1978@…):
It seems behaviors of MacRuby's IO#gets as follows:
1. At first time IO#gets calls
* CFDataGetLength(io_struct->buf) is 0 and calls read_internal().
* IO#gets is waited by read_internal() that data is input.
2. At second times IO#gets calls
* Output data is stored in io_struct->buf with IO#puts immediately
before.[[BR]]
So, CFDataGetLength(io_struct->buf) is not 0 and does not call
read_internal().
* IO#gets is not waited.
* IO#gets gets a 0 byte data from io_struct->buf. Its data seems a nil
class.
3. IO#puts and chomp are called for nil, and the exception is generated.
--
Ticket URL: <http://www.macruby.org/trac/ticket/754#comment:1>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list