The Bodhisatta was once king of Gandhāra, and he and the king of Videha became friends, though they never saw each other. One day the Gandhāra king saw an eclipse of the moon and, being stirred in his mind, left his kingdom and became an ascetic in Himavā.
The Videha king, hearing of this, did likewise. They met in Himavā, but failed to recognise each other until, seeing another eclipse of the moon, they exchanged reminiscences. They went out begging together, and the Videha ascetic, having once been given a large quantity of salt, stored up some of it for a day when they got no salt. The Gandhāra ascetic, finding this out, blamed his friend for his greediness, and the latter begged his forgiveness.
The Videha ascetic is identified with Ānanda. The story was told in reference to the occasion of the passing of the rule forbidding monks to store medicine for more than seven days. J.iii.363 ff; the introductory story is given in Vin.i.206 ff; see also Piliṇḍivaccha; the Jātaka story is given in MA.i.534 f.