From: Michal Suchanek Date: 2009-02-19T19:55:12+09:00 Subject: [ruby-core:22254] Re: [Feature #908] Should be an easy way of reading N characters from am I/O stream 2009/2/19 Tanaka Akira : > In article , > "Michael Selig" writes: >> Also it seems to me that the current usage of the "limit" parameter of >> IO#gets is not intuitive in 1.9. It is "maximum number of bytes, but don't >> split a character", and I think it should be changed to mean "maximum >> number of chars". That would be much more obvious, more useful (IMHO), and >> still be backward compatible with 1.8. > > It is introduced for security reason. bytes are more stable > than characters. > However, the security would be served as well by a character limit. As I understand it this limit is introduced so that a gets does not read several gigabytes of data at once in case there is no line separator. Thanks Michal