he weighed the ring in his hand , hesitating , and forcing himself to remember all that gandalf had told him ; and then with an effort of will he made a movement , as if to cast it away c but he found that he had put it back in his pocket .