# File lib/aws/s3/data_options.rb, line 108
      def validate_data! options, &block

        data = options[:data]
        file = options[:file]

        raise ArgumentError, 'Object data passed multiple ways.' if
          [data, file, block].compact.count > 1

        data = file if file

        return if block_given?
        return if data.kind_of?(String)
        return if data.kind_of?(Pathname)
        return if io_like?(data)

        msg = ":data must be provided as a String, Pathname, File, or "
        msg << "an object that responds to #read and #eof?"
        raise ArgumentError, msg

      end