Hi,

In message "Re: [ruby-core:18617] IO limit - bytes or characters?"
    on Tue, 16 Sep 2008 15:20:59 +0900, "Michael Selig" <michael.selig / fs.com.au> writes:

|Several methods in IO take an option "limit" - gets/each_line etc. I  
|thought, because these methods are based on a "line", that "limit" would  
|be "maximum number of characters". However, it seems to be bytes, but it  
|seems to be rounded up to the nearest whole character. At least it doesn't  
|seem to split up multi-byte characters. Is this the intended behaviour?

Yes.

|The documentation is rather vague: "the returning string would not be  
|longer than the given value", but this sounds like it means number of  
|characters. So may I suggest that either the behaviour be changed to mean  
|"number of characters" (preferable), or the documentation explain what it  
|does on multi-byte character encodings.

I updated rdoc to mention "in bytes".  If you have any better
description, let us know.

							matz.