Erchin 9:5-6
Erchin 9:5
Anything inside a city’s wall is like a house with the exception of fields; Rabbi Meir includes even the fields. If a house is built into the wall, Rabbi Yehuda says that it’s not counted as a house in a walled city; Rabbi Shimon says that the outer wall is its wall (and it is therefore considered a house in a walled city).
Erchin 9:6
Let’s say that a city’s rooftops are connected like a wall but it was not walled in the time of Joshua; such a city is not considered walled. The following are considered houses in walled cities: there are at least three courtyards with two houses each, and they have been walled since the time of Joshua. Such cities include the old castle near Sepphoris, the fort of Gush Chalav, old Yodfas, Gamla, G’dod, Chadid, Ono and Jerusalem, among others.