No, it hasn't.
While such laws ARE on the books in Iran and a handful of others like Saudi Arabia, the death penalty has never been carried out.
Iran has done kooky things, as shown in a NYTimes article some years ago where young men sporting hairdos considered a little too on the 'sweet side' in Tehran were paraded around in public with a traditional anus cleaner used before the introduction of toilet paper taped to their mouths as punishment. Not a pleasant ordeal, but not quite lethal either.
They have had shocking executions for really sick reasons, especially for women and the poor.