From: gotoken@... (GOTO Kentaro) Date: 2001-01-09T00:04:33+09:00 Subject: [ruby-talk:8873] Re: About string return from IO::gets In message "[ruby-talk:8846] About string return from IO::gets" on 01/01/08, "and.u" writes: >How to limit string which return from IO::gets max length ? Do you really need reading a *line*? IO#gets is a line-oriented interface of IO. If you would do something to control input buffer, you maybe have to IO#read or IO#sysread, which can take an optional argument to specify the length. Otherwise, Mark's comment [ruby-talk:8866] might help you. -- Gotoken p.s. We denote by `IO::gets' a class method `gets' (which does not exist as built-in); IO#gets stands for an instance method `gets' of IO. These distinction make our comminication clearer :-)