Hi,

In message "Re: [ruby-core:18631] Request: File.binread (Or File.read_binary)"
    on Tue, 16 Sep 2008 22:15:16 +0900, "Gregory Brown" <gregory.t.brown / gmail.com> writes:

|Just incase it got lost in the other thread, I'd like to recommend the
|inclusion of a File.binread method.
|(Or preferably, File.read_binary)
|
|Trivial Ruby implementation below.  The idea is that this would allow
|us to forget about the encoding of a binary blob unless we actually
|need to know it (then use File.open), and give us a short and clear
|way to express a common need.
|
|class File
|  def self.read_binary(file_name)
|    File.open(file_name, "rb:BINARY") { |f| f.read }
|  end
|end

Defines a exact behavior.  Does it take length or offset option, as
File.read does?

							matz.