lib/rtf/node.rb
def read_source(file, read, size=nil)
         if block_given?
            done = false

            while !done and !file.eof?
              read << file.getbyte
               done = yield read[-1]
            end
         else
            if size != nil
               if size > 0
                  total = 0
                  while !file.eof? and total < size
                     read << file.getbyte
                     total += 1
                  end
               end
            else
               file.each_byte {|byte| read << byte}
            end
         end
      end
def read_source(file, read, size=nil)
         if block_given?
            done = false

            while !done and !file.eof?
              read << file.getbyte
               done = yield read[-1]
            end
         else
            if size != nil
               if size > 0
                  total = 0
                  while !file.eof? and total < size
                     read << file.getbyte
                     total += 1
                  end
               end
            else
               file.each_byte {|byte| read << byte}
            end
         end
      end
This method loads the data for an image from its source. The method
 accepts two call approaches. If called without a block then the method
 considers the size parameter it is passed. If called with a block the
 method executes until the block returns true.

 ==== Parameters
 size::  The maximum number of bytes to be read from the file. Defaults
         to nil to indicate that the remainder of the file should be read
         in.