Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
hakim:7817ʿAlī b. Ḥamshādh al-ʿAdl > Ismāʿīl b. Isḥāq al-Qāḍī > Muslim b. Ibrāhīm > ʿUbays b. Maymūn > Yaḥyá b. Abū Kathīr > Abū Salamah > Abū Hurayrah

[Machine] The Messenger of Allah ﷺ said, "Whoever takes an oath, he will be as he has sworn. If he says he is a Jew, then he is a Jew. If he says he is a Christian, then he is a Christian. And if he says he is free from Islam, then he is free from Islam. And whoever claims the falsehood of Jahiliyyah (ignorance), then he will be among the inhabitants of Hellfire." They said, "O Messenger of Allah, even if he fasts and prays?" He said, "Even if he fasts and prays."  

الحاكم:٧٨١٧حَدَّثَنِي عَلِيُّ بْنُ حَمْشَاذَ الْعَدْلُ ثَنَا إِسْمَاعِيلُ بْنُ إِسْحَاقَ الْقَاضِي ثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ ثَنَا عُبَيْسُ بْنُ مَيْمُونٍ ثَنَا يَحْيَى بْنُ أَبِي كَثِيرٍ عَنْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ «مَنْ حَلَفَ عَلَى يَمِينٍ فَهُوَ كَمَا حَلَفَ إِنْ قَالَ هُوَ يَهُودِيٌّ فَهُوَ يَهُودِيٌّ وَإِنْ قَالَ هُوَ نَصْرَانِيٌّ فَهُوَ نَصْرَانِيٌّ وَإِنْ قَالَ هُوَ بَرِيءٌ مِنَ الْإِسْلَامِ فَهُوَ بَرِيءٌ مِنَ الْإِسْلَامِ وَمَنِ ادَّعَى دَعْوَى الْجَاهِلِيَّةِ فَإِنَّهُ مِنْ جُثَا جَهَنَّمَ» قَالُوا يَا رَسُولَ اللَّهِ وَإِنْ صَامَ وَصَلَّى؟ قَالَ «وَإِنْ صَامَ وَصَلَّى»  

هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخَرِّجَاهُ الخبر منكر

See similar narrations below:

Collected by Suyūṭī
suyuti:21398a
Request/Fix translation

  

السيوطي:٢١٣٩٨a

"مَنْ حَلَفَ عَلَى يَمِين فَهُوَ كَمَا حَلَفَ، إِنْ قَال: هُوَ يَهُودِيٌّ، فَهُوَ يَهُودِيٌّ، وَإِنْ قَال: هُوَ نَصْرَانِيٌّ فَهُوَ نَصْرَانِيٌّ، وَإنْ (قَال) : هُوَ بَرئٌ مِنَ الإسْلامِ فَهُوَ بَرِئٌ مِنَ الإِسْلامِ، وَمَنْ ادَّعَى دَعْوَى الْجَاهِلِيةِ فَإِنَّهُ مِنْ جَثَا جَهَنَّمَ وَإِنْ صَامَ وَصَلَّى".  

[ك] الحاكم في المستدرك عن أَبي هريرة