Musar for Shabbat 296:2
וא"ל רבא בר רב חנן לאביי תנן לא מספקין ולא מטפחין ולא מרקדין ביו"ט וקא חזינן דעבדין ולא אמרינן להו ולא מידי ולטעמיך הא דאמר רבא לא ליתיב איניש אפומא דלחייא דילמא מיגנדר ליה חפץ ואתי לאיתויי והא קא חזינן נמי דמותבי חצבי ויתבן אפומא דמבואה ולא אמרינן להו ולא מידי אלא הנח לישראל מוטב שיהו שוגגין ואל יהו מזידין
Raba son of R. Hanan also said to Abaye: We learnt, One must not clap [the hands], beat [the breast], or dance<span class="x" onmousemove="('comment',' The former two in grief the third in joy. ');"><sup>2</sup></span> on Festivals. Yet we see that they do it, and do not rebuke them in any way? — Then on your reasoning, when Rabbah said: A man should not sit on the top of a stake, lest an article roll away from him and he come to fetch it,<span class="x" onmousemove="('comment',' V. supra 141a. ');"><sup>3</sup></span>