There is something at once medievalesque and Sherlock Holmsian in Gandalf going off to search for the truth about the Ring in the ancient library of Denethor.  Quite the reverse of what one would expect, literacy in this case stands behind orality.  From Saruman’s mouth Gandalf had heard that the One Ring bore certain markings, but not what markings they were.  He thus stood in great need of finding out the true identifying marks of the One, and reasoned so:

Who now would know?  The maker.  And Saruman?  But great though his lore may be, it must have a source.  What hand save Sauron’s ever held this thing, ere it was lost?  The hand of Isildur alone.

The word source, and the inductive (deductive?) inference that Saruman’s knowledge has one, gives the whole episode at once the feel of a twentieth-century researcher running off to discover an unmined primary text, and a medieval theologian searching through every scrap of parchment he can find for authorities to back him up.  Gandalf goes then to Gondor, to comb through Denethor’s “hoarded scrolls and books” for any record Isildur might have left of the Ring.

Twice, incidentally, Gandalf refers to the store of books and records as a “hoard.”  Only in a world before its Gutenberg can this word be applied books as well as to gold.  And in very few places in any world could the Lord of a City be described as a “lore-master.”  But it is so in Gondor.  “Unless you have more skill even than Saruman,” Denethor tells Gandalf proudly, “you will find naught that is not well known to me, who am master of the lore of this City.”

There is both a moral and a heaping dose of scholarly self-consciousness in the fact that Gandalf discovers the truth about the Ring in a library.  Self-consciousness in that Tolkien himself was a scholar, and was clever enough to work the import of his profession into the narrative of the Ring.  A moral in that a library, with all its lore of the past, turns out to be tied inextricably to the present; and that the work of the scholar is perhaps not always in vain.