From: Michael Selig Date: 2008-12-21T10:50:56+09:00 Subject: [ruby-core:20741] [Bug #912] Confusion over encoding returned by IO#read & IO.read Bug #912: Confusion over encoding returned by IO#read & IO.read http://redmine.ruby-lang.org/issues/show/912 Author: Michael Selig Status: Open, Priority: Normal I find it confusing that IO#read & IO.read return an ASCII-8BIT string when a length is specified, but not when the entire file is read (no length specified). Given that we have "binread" to read binary data, why not make "read(length)" work like gets("", length) so it consistently returns the encoding? ---------------------------------------- http://redmine.ruby-lang.org