The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"With matted hair."--This story was told by the boaster while at Jetavana, about a hypocrite. The incidents were like those above related 1.
Once on a time when Brahmadatta was reigning in Benares, the Bodhisatta was born a lizard; and in a but hard by a village on the borders there lived a rigid ascetic who had attained the Five Knowledges, and was treated with great respect by the villagers. In an ant-hill at the end of the walk where the recluse paced up and down, dwelt the Bodhisatta, and twice or thrice each day he would go to the recluse and hear words of edification and holiness. Then with due obeisance to the good man, the Bodhisatta would depart to his own abode. After a certain time the ascetic bade farewell to the villagers and went away. In his stead there came another ascetic, a rascally fellow, to dwell in the hermitage. Assuming the holiness of the new-comer, the Bodhisatta acted towards him as to the first ascetic. One day an unexpected storm in the dry season brought out the ants on their hills 2, and the lizards, coming abroad to eat them, were caught in great numbers  by the village folk; and some were served up with vinegar and sugar for the ascetic to eat. Pleased with so savoury a dish, he asked what it was, and learned that it was a dish of lizards. Hereon he reflected that he had a remarkably fine lizard as his neighbour, and resolved to dine off him. Accordingly he made ready the pot for cooking and sauce to serve the lizard in, and sat at the door of his hut with a mallet hidden under his yellow robe, awaiting the Bodhisatta's coming, with a studied air of perfect peace. At evening the Bodhisatta came, and as he drew near, marked that the hermit did not seem quite the same, but had a look about him that boded no good. Snuffing up the wind which was blowing towards him from the hermit's cell, the Bodhisatta smelt the smell of lizard's flesh, and at once realised how the taste of lizard had made the ascetic want to kill him with a mallet and eat him up. So he retired homeward without calling on the ascetic. Seeing that the Bodhisatta did not come, the ascetic judged that the lizard must have divined his plot, but marvelled how he could have discovered it. Determined that the lizard should not escape, he drew out the mallet and threw
it, just hitting the tip of the lizard's tail. Quick as thought the Bodhisatta dashed into his fastness, and putting his head out by a different hole to that by which he had gone in, cried, "Rascally hypocrite, your garb of piety led me to trust you, but now I know your villainous nature. What has a thief like you to do with hermit's clothing?" Thus upbraiding the false ascetic, the Bodhisatta recited this stanza:--
 In this wise did the Bodhisatta expose the wicked ascetic, after which he retired into his ant-hill. And the wicked ascetic departed from that place.
His lesson ended, the Master identified the Birth by saying, "The hypocrite was the wicked ascetic of those days, Sāriputta the good ascetic who lived in the hermitage before him, and I myself the lizard."
297:1 Apparently No. 128. Cf. No. 325.
297:2 Cf. p. 303.
298:1 Dhammapada v. 394.