R. Jehudah Halevi, urged by his wife to marry their daughter, swore he would give her to the first Jew who would come and knock at the door. The next morning a young man in rags came. Though surprised, the Rabbi accepted him and asked him to become his pupil and thus become more worthy of their daughter. The young man agreed and made apparently great progress. One day the Rabbi, deeply absorbed in the composition of a poem, came late to the meal. He could not complete a strophe and the young man, hearing of it, quietly completed it. Jehudah Halevi through it then recognised him to be the famous Ben Ezra, who had disguised himself so as not to be recognised. He then became the son-in-law.
Yehudah HaLevi, the Ragged Student, and Ibn Ezra
Gaster, Exempla of the Rabbis No. 356 (1924); Codex Gaster 130