Gmail is very straight forward in their file uploading policy, they do not allow various file extensions, and a couple of those are the .exe, .zip and .rar file extensions.
When you try to upload a .rar file which contains an executable or any other type of extension that is often used by malicious applications, the upload will be halted, and you will get a message from Google stating that your file has not been uploaded as it might be malicious.
I tried to encrypt and password protect the .rar file with its own password wizard and encryption module (for the filenames), and it was still detected by Gmail.
So I tried the same on Facebook, and guess what, it worked like a charm.
The following extensions are blocked by Gmail:
.JS, .ADE, .ADP, .BAT, .CHM, .CMD, .COM, .CPL, .EXE, .HTA, .INS, .ISP, .JAR, .JSE, .LIB, .LNK, .MDE, .MSC, .MSI, .MSP, .MST, .NSH, .PIF, .SCR, .SCT, .SHB, .SYS, .VB, .VBE, .VBS, .VXD, .WSC, .WSF, .WSH