At this point Gandalf says in a puzzled tone
"it's been called that before ... but not by you"
I wonder... how can he have known that Gollum had this ring BEFORE he did his investigations....??
... this if from the film of course!
I think that at this point in the film gandalf mutters 'riddles in the dark' either before or after he says that.........so I think is refering to Bilbo's encounter with gollum when he found the ring, when bilbo and gollum were playing a game of riddles, in the dark cave...it could be that bilbo has told gandalf this story and gandalf remembers gollum saying 'my precious' when they were doing the riddles....it is not really explained at all at that point but I think the reference to 'riddles in the dark' is for those who have read 'The Hobbit' and those who have read it would know at that point that the creature gollum had called the ring 'my prescious' before bilbo had found it in the dark.
hmm I hope that all made sense..,.