Mujahid narrates from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that he said: "(Saying something is) forbidden (haram) takes the ruling of an oath, for which expiation is to be made."
Abd al-Razzaq said: Al-Thawri narrated it through Ash'ath, al-Hakam and Ibrahim from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) thus: He said: "If the one saying it intended divorce, it is a divorce; otherwise, it is an oath."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9597