Some apostates were brought to Ali , and he had them burned. When Ibn Abbas heard of this, he said, "Had it been me, I would not have burned them, because the Messenger of Allah ﷺ forbade it, saying, 'Do not punish with the punishment of Allah.' But I would have killed them, in accordance with the Messenger of Allah's ﷺ words, 'Whoever changes his religion, kill him.'"
أتي علي رضي الله عنه بزنادقة فأحرقهم، فبلغ ذلك ابن عباس فقال: لو كنت أنا لم أحرقهم، لنهي رسول الله ﷺ: لا تعذبوا بعذاب الله ولقتلتهم لقول رسول الله ﷺ: من بدل دينه فاقتلوه.
Bukhari narrated it in the Chapter on Calling Apostates Back (6922), from Abu Numan Muhammad bin Fadl, who said, Hammad bin Zayd narrated to us, from Ayub, from Ikrima, and he related it.Abu Dawud also narrated it (4351), adding at the end, from the words of Ali, "Woe to Ibn Abbas." Tirmidhi narrated it (1457) and said at the end, from the words of Ali, "Ibn Abbas has spoken the truth."The expression "woe" originally serves as an invocation against someone, but its meaning here is praise for him and admiration for what he said, as Khattabi stated.