From: gotoken@... (GOTO Kentaro) Date: 2001-01-09T02:14:15+09:00 Subject: [ruby-talk:8882] Re: About string return from IO::gets In message "[ruby-talk:8881] Re: About string return from IO::gets" on 01/01/09, "and.u" writes: >So I think using io.gets is simple way. For some >reason, I want to limit chars which are read actually. The point is the reason. If you would like to limit the length *after* read whole of line, you can use substring technic [ruby-talk:8866]. But if you would like to limit the length to read from a socket, you have to use IO#read or sysread. Maybe sysread is needed to avoid blocking. -- Gotoken