Eiruvin 4:4-5
Eiruvin 4:4
Let’s say that a traveler sat by the roadside before Shabbos and got up after Shabbos began, only then realizing that he was inside the city’s Shabbos boundary. Rabbi Meir says that since it was not his intention to establish his Shabbos residence within the city limits, he is not allowed to enter the city; Rabbi Yehuda says that he may. This once happened to Rabbi Tarfon and he entered the city even though such had not been his intention.
Eiruvin 4:5
Let’s say that the traveler slept by the side of the road and was asleep when Shabbos started so he had no intention whatsoever as to the location of his Shabbos residency. Rabbi Yochanan ben Nuri says he has 2,000 cubits in each direction but the sages say he has only four cubits. Rabbi Eliezer says that the traveler’s location is the center of the four cubits but Rabbi Yehuda says that he can go four cubits in any direction he chooses. Rabbi Yehuda agrees that if the traveler chooses a direction for his cubits, he is bound by his decision.