(Devarim 23:16) "Do not deliver a servant to his master": From here they ruled: If one sells his servant to an idolator or to one outside of Eretz Yisrael, he goes free.
"who shall escape to you from his master": to include a ger toshav ("a sojourning stranger," a gentile who takes it upon himself not to serve idolatry and to heed the seen Noachide laws)
(דברים כג טז) לֹא תַסְגִּיר עֶבֶד אֶל אֲדֹנָיו, מִכָּן אָמְרוּ: הַמּוֹכֵר עַבְדּוֹ לְגוֹיִם אוֹ לְחוּצָה לָאָרֶץ יָצָא בֶן חוֹרִים.
(Devarim 23:16) "Do not deliver a servant to his master": From here they ruled: If one sells his servant to an idolator or to one outside of Eretz Yisrael, he goes free.
אֲשֶׁר יִנָּצֵל אֵלֶיךָ מֵעִם אֲדֹנָיו, לְרַבּוֹת גֵּר תּוֹשָׁב.
"who shall escape to you from his master": to include a ger toshav ("a sojourning stranger," a gentile who takes it upon himself not to serve idolatry and to heed the seen Noachide laws)
(דברים כג יז) עִמְּךָ יֵשֵׁב, וְלֹא בָּעִיר עַצְמוֹ. בְּקִרְבְּךָ, וְלֹא בַּסְּפָר.
[If he leaves the gentiles and comes to Eretz Yisrael, do not return him to them.] (Ibid. 17) "With you shall he dwell" — in the city itself.
בַּמָּקוֹם אֲשֶׁר יִבְחָר, בַּמָּקוֹם שֶׁפַּרְנָסָתוֹ יוֹצְאָה.
"in your midst" — and not in an outlying district. "in the place that he chooses" — where he can find sustenance.
בְּאַחַד שְׁעָרֶיךָ, בִּשְׁעָרֶיךָ וְלֹא בִּירוּשָׁלִַם. כְּשֶׁהוּא אוֹמֵר בְּאַחַד שְׁעָרֶיךָ שֶׁלֹּא יְהֵא גּוֹלֶה מֵעִיר לְעִיר.
"in your gates" — and not in Jerusalem. "in one of your gates" — and not in exile from city to city.
בַּטּוֹב לוֹ, מִנָּוֶה הָרָע לְנָוֶה הַיָּפֶה.
"where it is good for him" — from an inferior location to a superior one.
לֹא תּוֹנֶנּוּ, זוֹ הוֹנָאַת דְּבָרִים.
"you shall not oppress him" — verbal oppression.
דָּבָר אַחֵר: לֹא תַסְגִּיר עֶבֶד אֶל אֲדֹנָיו, בְּגוֹי שֶׁנִּצַּל מֵעֲבוֹדָה זָרָה הַכָּתוּב מְדַבֵּר.