Hi, I believe there is a bug in stringio module require "stringio" s =StringIO.open() s << "a\r\nb\r\n\r\n" s.rewind s.readline("\r\n") => "a\r\nb\r\n\r\n" The result should be "a\r\n" Thanks -Ted