lib/fakefs/pathname.rb
def write(string, *args)
      offset = args[0]
      open_args = args[1]
      File.open(@path, open_args || 'w') do |file|
        file.seek(offset) if offset
        return file.write(string)
      end
    end
def write(string, *args)
      offset = args[0]
      open_args = args[1]
      File.open(@path, open_args || 'w') do |file|
        file.seek(offset) if offset
        return file.write(string)
      end
    end
See <tt>File.write</tt>. Returns the number of bytes written.