It works, as will almost any organic oil or grease, organic oils have free hydroxide molecoles that can bond with the oxygen in the red rust. unfortunatly, the black rush is in a higher state of oxidation, it's bonded bore tightly to the iron, and the oil won't touch that.
Veggie oil is a fairly well behaved substance, if not for the fact that it eventually becomes rancid, it would be usefull as lubrication also (long ago, it was in fact lubrication, that nasty black axle grease used on wagons was made from vegitable oils, animal oils and soaps )....
Unlike vinegar, it won't dissolve any metal, and it will make your hands all silky smooth...