If one was standing in his courtyard and extended his hand full of fruit through a window or an entrance to the reshut harabbim—if he extended it unintentionally, he is permitted to return it; but if he extended it intentionally, he is forbidden to return it, for they penalized him that he should not return it but rather stand thus until it becomes dark. The penalty is because he began with a prohibition, for if he were to place them in the reshut harabbim, he would be moving from a reshut hayachid to a reshut harabbim; therefore they penalized him. And this is specifically when he extended it below ten, but above ten, this is not the airspace of the reshut harabbim, and even if he extended it by way of below—he is permitted to return it by way of above ten (Tosafot 3a, beginning with "Kan", see there). There is another resolution in the Gemara (3a) that if he extended it on Shabbat—they permitted him to return it, and if he extended it while it was still day—he is forbidden to return it. The reason is that in most cases it will be difficult for him to keep it thus until night and he will throw the fruit. Therefore, on Shabbat, when he throws he will come to a chiyuv chatat—they did not want to penalize him. But while it was still day, where even if he throws there will be no chiyuv chatat, since the akirah was not on Shabbat—they penalized him, and if he throws, what of it? (See Magen Avraham that "chiyuv chatat" is not exact, since he would be throwing intentionally, but rather a prohibition).
היה עומד בחצר שלו, והוציא ידו מליאה פירות דרך חלון או פתח לרשות הרבים - אם הוציא בשוגג מותר לו להחזירה, ואם הוציא במזיד - אסור לו להחזירה, דקנסוהו שלא יחזירנה אלא יעמוד כך עד שתחשך. והקנס הוא מפני שהתחיל באיסור, דאלמלי היה מניחם ברשות הרבים, היה מוציא מרשות היחיד לרשות הרבים, לפיכך קנסוהו. וזהו דוקא כשהוציא למטה מעשרה, אבל למעלה מעשרה הרי אין כאן אויר רשות הרבים, ואפילו הוציאה דרך מטה - מותר לו להחזירה דרך מעלה מי' (תוספות ג': ד"ה 'כאן' ע"ש)עוד יש אוקימתא בגמרא (ג':) דאם הוציאה בשבת - התירו לו להחזירה, ואם הוציאה מבעוד יום - אסור לו להחזירה. והטעם, דעל פי רוב יהיה קשה לו להשהותה כך עד הלילה ושדי להו להפירות. ולכן בשבת כשיזרוק יבא לידי חיוב חטאת - לא רצו לקונסו. אבל מבעוד יום, שאף אם יזרוק לא יהיה חיוב חטאת, שהרי העקירה לא היתה בשבת - קנסוהו, ואם יזרוק מה בכך. (עיין מג"א דחיוב חטאת לאו דוקא שהרי במזיד יזרוק אלא איסורא).