On Sep 17, 2008, at 09:48 AM, Gregory Brown wrote:
> On Wed, Sep 17, 2008 at 12:35 PM, Yukihiro Matsumoto <matz / ruby-lang.org 
> > wrote:
>> |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?
>
> Oh, sorry for not being specific: So long as it makes sense to do so,
> this should behave as close to how File.read does as possible, so it
> should be able to take those options.

I have a method in RubyGems to do the same (Gem.read_binary) and I  
only use it for reading whole files (no length, offset options).