The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"The thoughtless man."--This story the Master told while at Jetavana, about the son of Over-Treasurer. This Over-Treasurer is said to have been a very rich man of Sāvatthi, and his wife became the mother of a righteous being from the realm of Brahma angels, who grew up as lovely as Brahma.  Now one day when the Kattikā festival had been proclaimed in Sāvatthi, the whole city gave itself up to the festivities. His companions, sons of other rich men, had all got wives, but Over-Treasurer's son had lived so long in the Brahma Realm that he was purged from passion. His companions plotted together to get him too a sweetheart and make him keep the feast with them. So going to him they said, "Dear friend, it is the great feast of Kattikā.. Can't we get a sweetheart for you too, and have a good time together?" At last his friends picked out a charming girl and decked her out, and left her at his house, with directions to make her way to his chamber. But when she entered the room, not a look or a word did she get from the young merchant. Piqued at this slight to her beauty, she put forth all her graces and feminine blandishments, smiling meantime so as just to shew her pretty teeth. The sight of her teeth suggested bones, and his mind was filled with the idea of bones, till the girl's whole body seemed to him nothing but a chain of bones. Then he gave her money and bade her begone. But as she came out of the house a nobleman saw her in the street and gave her a present to accompany him home.
At the end of seven days the festival was over, and the girl's mother, seeing her daughter did not come back, went to the young merchant's friends and asked where she was, and they in turn asked the young merchant. And he said he had paid her and sent her packing as soon as he saw her.
Then the girl's mother insisted on having her daughter restored to her, and brought the young man before the king, who proceeded to examine into the matter. In answer to the king's questions, the young man admitted that the girl had been passed on to him, but said he had no knowledge of her whereabouts, and no means of producing her. Then said the king, "If he fails to produce the girl, execute him." So the young man was forthwith hauled off with his hands tied behind his back to be executed, and the whole city was in an uproar at the news. With hands laid on their breasts the people followed after him with lamentations, saying, "What means this, sir? You suffer unjustly."
Then thought the young man  "All this sorrow has befallen me because I was living a lay life. If I can only escape this danger, I will give up the world and join the Brotherhood of the great Gotama, the All-Enlightened One."
Now the girl herself heard the uproar and asked what it meant. Being told, she ran swiftly out, crying, "Stand aside, sirs! let me pass! let the king's men see me." As soon as she had thus shown herself, she was handed over to her mother by the king's men, who set the young man free and went their way.
Surrounded by his friends, the son of Over-Treasurer went down to the river and bathed. Returning home, he breakfasted and let his parents know his resolve to give up the world. Then taking cloth for his ascetic's robe, and followed by a great crowd, he sought out the Master and with due salutation asked to be admitted to the Brotherhood. A novice first, and afterwards a full Brother, he meditated on the idea of Bondage till he gained Insight, and not long afterwards won Arahatship.
Now one day in the Hall of Truth the assembled Brethren talked of his virtues, recalling how in the hour of danger he had recognized the excellence of the Truth, and, wisely resolving to give up the world for its sake, had won that highest fruit which is Arahatship. And as they talked, the Master entered, and, on his asking, was told what was the subject of their converse. Whereon he declared to them that, like the son of Over-Treasurer, the wise of former times, by taking thought in the hour of peril, had escaped death. So saying, he told this story of the past.
Once on a time when Brahmadatta was reigning in Ḅenares, the Bodhisatta by change of existence was born a quail. Now in those days there was a quail-catcher who used to catch numbers of these birds in the forest and take them home to fatten. When they were fat, he used to sell them to people and so make a living. And one day he caught the Bodhisatta and brought him home with a number of other quails. Thought the Bodhisatta to himself, "If I take the food and drink he gives me, I shall be sold; whilst if I don't eat it, I shall get so thin, that people will notice it and pass me over, with the result that I shall be safe. This, then, is what I must do." So he fasted and fasted till he got so thin that he was nothing but skin and bone, and not a soul would have him at any price. Having disposed  of every one of his birds except the Bodhisatta, the bird-catcher took the Bodhisatta out of the cage and laid him on the palms of his hand to see what ailed the bird. Watching when the man was off his guard, the Bodhisatta spread his wings and flew off to the forest. Seeing him return, the other quails asked what had become of him so long, and where he had been. Then he told them he had been caught by a fowler, and, being asked how he had escaped, replied, that it was by a device he had thought of, namely, not to take either the food or the drink which the fowler supplied. So saying, he uttered this stanza:--
In this manner did the Bodhisatta speak of what he had done.
His lesson ended, the Master identified the Birth by saying, "I was the quail that escaped death in those days."