One of the cases presented by the Mishna (41b) describes a person who was forcibly moved from his established place on Shabbat to another city, and placed in a prison or other enclosed area. Rabban Gamliel and Rabbi Elazar ben Azarya rule that he can walk freely, since the whole area is considered as if it was four cubits, since it is enclosed; Rabbi Akiva and Rabbi Yehoshua rule that he is only allowed the immediate four amot that surround him.
To illustrate this disagreement, the Mishna tells a story.
There was an incident where all of these Sages were coming from Pelandarsin, an overseas location, and their boat set sail on the sea on, taking them beyond their limit. Rabban Gamliel and Rabbi Elazar ben Azarya walked about the entire boat, as they hold that the entire boat is considered like four cubits, while Rabbi Yehoshua and Rabbi Akiva did not move beyond four cubits, as they sought to be stringent with themselves.
Pelandarsin is apparently a reference is to the Italian city of Brudisium, which is the modern-day city of Brindisi,an important harbor in Calabria, Italy.
As far as the halakha is concerned, the Gemara brings a disagreement between the amoraim as to whether we rule like Rabban Gamliel or Rabbi Akiva in the case where the person has been taken to another city. With regard to the boat, however, everyone agrees that we accept Rabban Gamliel’s ruling that the person can walk around the entire area. The Jerusalem Talmud notes that this is apparent from the Mishna itself, which records that Rabbi Yehoshua and Rabbi Akiva remained within their four cubits “because they wanted to be stringent on themselves” but even they appear to agree that in the case of the boat, according to the letter of the law one is allowed full access.
Two reasons are brought by the Gemara to explain what is unique about the case of boat travel. According to Rabba, in the case of the boat the travelers are already within the closed walls of the boat before Shabbat begins. Rabbi Zeira explains that it is impossible to expect someone traveling on a boat to remain within four cubits, after all, the boat itself travels more than four cubits with each movement.
The Ritva explains that Rabbi Yehoshua and Rabbi Akiva were not willing to accept this idea for themselves, since from their perspective although the boat was moving, they had established themselves in one spot on the boat, which became their “Shabbat place” once the boat took them out of the tehum (=limits).