The Shulchan Aruch · Orach Chayim
אורח חיים שע״טOrach Chayim 379
Siman 379 of 697 in Orach Chayim — 2 se'ifim
הלכות ערוביןLaws of Eruvin· siman 379
Se’if 1א׳
ב' חֲצֵרוֹת וְג' בָּתִּים בֵּינֵיהֶם פְּתוּחִים זֶה לָזֶה וְרוֹצִים לְעָרֵב יַחַד, חָצֵר זֶה בָּא דֶּרֶךְ בַּיִת שֶׁאֶצְלוֹ וְנוֹתֵן עֵרוּבוֹ בַּבַּיִת שֶׁבָּאֶמְצַע, וְכֵן עוֹשֶׂה הַשְּׁנִיָּה, וּמֻתָּרִים בִּשְׁלָשְׁתָּן; שֶׁכָּל בַּיִת שֶׁאֵצֶל הֶחָצֵר חָשׁוּב לוֹ כְּבֵית שַׁעַר וְאֵינוֹ צָרִיךְ לִתֵּן פַּת, וְהָאֶמְצָעִי הוּא בַּיִת שֶׁמַּנִּיחִין בּוֹ עֵרוּב וְאֵינוֹ צָרִיךְ לִתֵּן פַּת.
Laws of courtyards and houses between them. Contains 2 sections Two courtyards with three houses between them opening into one another, wishing to make a joint eruv — one courtyard comes through the house adjacent to it and places its eruv in the middle house, and the second courtyard does likewise. They are then permitted in all three, since each house adjacent to a courtyard counts as a gatehouse for it and need not contribute bread, and the middle house is the house in which the eruv is placed and also need not contribute bread.
Se’if 2ב׳
שְׁתֵּי חֲצֵרוֹת וּשְׁנֵי בָּתִּים בֵּינֵיהֶם וְלֹא עֵרְבוּ יַחַד אֶלָּא כָּל אַחַת לְעַצְמָהּ, וּבָא (בֶּן) חָצֵר זֶה דֶּרֶךְ בַּיִת שֶׁאֶצְלוֹ וְהִנִּיחַ עֵרוּבוֹ בַּבַּיִת שֶׁאֵצֶל הַשֵּׁנִי, וְכֵן עָשָׂה הַשֵּׁנִי שֶׁגַּם הוּא הִנִּיחַ עֵרוּבוֹ בַּבַּיִת הַסָמוּךְ לֶחָצֵר הָאַחֶרֶת, לֹא קָנוּ עֵרוּב; שֶׁכָּל אֶחָד הִנִּיחַ עֵרוּב בְּבֵית שַׁעַר שֶׁל חָצֵר אַחֶרֶת.
Two courtyards with two houses between them, where they did not make a joint eruv but each made its own eruv separately — and one came from his courtyard through the house adjacent to it and placed his eruv in the house adjacent to the other courtyard, and the other did likewise, also placing his eruv in the house adjacent to the first courtyard — they have not acquired an eruv, since each one placed their eruv in the gatehouse of the other courtyard.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0