#754: TCP socket is disconnected when used IO#gets and IO#puts.
----------------------------------+-----------------------------------------
 Reporter:  watson1...@…          |       Owner:  lsansone...@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------

Comment(by watson1...@…):

 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/>

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to