Hammam reported from Ibn juraij that Anas said: “Whenever the Prophet (pbuh) entered the area in which he would relieve himself, he would remove his ring.” (Dali)

Comments:

It is the view of most scholars, that one should not enter the area in which he intends to relieve himself while carrying something with Allah’s Name on it.

(Sunan-Abu-Dawud volume 1, number 19)