From: Yusuke Endoh Date: 2012-02-13T21:05:49+09:00 Subject: [ruby-core:42536] [ruby-trunk - Feature #908] Should be an easy way of reading N characters from am I/O stream Issue #908 has been updated by Yusuke Endoh. Are there any volunteers to summarize the discussion? I cannot understand the whole discussion about this ticket. Redmine failed to capture some mails. -- Yusuke Endoh ---------------------------------------- Feature #908: Should be an easy way of reading N characters from am I/O stream https://bugs.ruby-lang.org/issues/908 Author: Michael Selig Status: Assigned Priority: Normal Assignee: Akira Tanaka Category: core Target version: 2.0.0 =begin I know of no way of reading N characters (as opposed to bytes) and returning a string other than writing a loop with getc or each_char. Suggestions - one of: 1) Change the "limit" paramater on IO#gets to mean characters rather than bytes. This would change existing behaviour, so may be unacceptable. 2) Add an optional "limit" parameter to IO#getc, so IO#getc will read up to this many characters =end -- http://bugs.ruby-lang.org/