title: NoMethodError for readbytes on Ruby File class
body: <p>I am writing a script to read the header bytes from a PNG file.  I want to use the <code>readbytes</code> method on <code>File</code>:</p>
  
  <pre><code>f = File.open("Boots.png", "rb:binary")
  header = f.readbytes(8)
  </code></pre>
  
  <p>But I get a <code>NoMethodError</code> on the second line:</p>
  
  <pre><code>NoMethodError: undefined method `readbytes` for #&lt;File:Boots.png&gt;
      from (irb):2
      from #:0
  </code></pre>
  
  <p>Why?  As far as I can tell from the doc, <code>readbytes</code> is part of the <code>IO</code> class, parent to <code>File</code>, and should be available to me, without a require or include.  I am almost exactly following a sample in the David Flanagan guide; I can even find the source <code>readbytes.rb</code> file in my Ruby installation.</p>
  
  <p>Note that I am running the MRI 1.8.7 on Windows 7.</p>