Shama-il Tirmidhi Chapter 11, Hadith Number 7 (88).

Anas bin Maalik Radiyallahu ‘Anhu reports: “When Rasulullah Sallallahu ‘Alayhi Wasallam went to the toilet, he removed his ring”.

As the name of Allah Jalla Jalaaluhu was engraved on it, he never went to the toilet with it. For this reason the ‘ulama have written that it is makruh to go to the toilet with anything that has a venerable name or sentence on it.