English translation
Full source narration. The matching passage has not yet been identified reliably.
1948. Narrated Tāwūs: Ibn 'Abbās رَضِيَ اللَّهُ عَنْهُمَا set out from Al-Madīna to Makkah and he observed Saum (fast) till he reached 'Usfān, where he asked for water and raised his hand to let the people see him, and then
broke the Ṣaum (fast), and did not observe Ṣaum (fast) after that till he reached Makkah, and that happened in Ramaḍān.
Ibn 'Abbās used to say, "Allāh's Messenger ﷺ (sometimes) observed Ṣaum (fast) and (sometimes) did not observe Ṣaum (fast) during the journeys, so whoever wished not to observe Ṣaum (fast), could do so."
[Bukhari, 1948.]
Arabic text
2023 -[5]
وَعَنِ ابْنِ عَبَّاسٍ قَالَ: خَرَجَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ الْمَدِينَةِ إِلَى مَكَّةَ فَصَامَ حَتَّى بَلَغَ عُسْفَانَ ثُمَّ دَعَا بِمَاءٍ فَرَفَعَهُ إِلَى يَدِهِ لِيَرَاهُ النَّاسُ فَأَفْطَرَ حَتَّى قَدِمَ مَكَّةَ وَذَلِكَ فِي رَمَضَانَ. فَكَانَ ابْنُ عَبَّاسٍ يَقُولُ: قَدْ صَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَأَفْطَرَ. فَمن شَاءَ صَامَ وَمن شَاءَ أفطر "