Bava Basra8: 5
הָאוֹמֵר ,,אִישׁ פְּלוֹנִי, בְּנִי בְכוֹר, לֹא יִטּוֹל פִּי שְׁנַיִם”; ,,אִישׁ פְּלוֹנִי בְנִי לֹא יִירַשׁ עִם אֶחָיו” — לֹא אָמַר כְּלוּם, שֶׁהִתְנָה עַל מַה שֶּׁכָּתוּב בַּתּוֹרָה. הַמְחַלֵּק נְכָסָיו לְבָנָיו עַל פִּיו, רִבָּה לְאֶחָד וּמִעֵט לְאֶחָד, וְהִשְׁוָה לָהֶן אֶת הַבְּכוֹר — דְּבָרָיו קַיָּמִין; וְאִם אָמַר מִשּׁוּם יְרֻשָּׁה — לֹא אָמַר כְּלוּם. כָּתַב בֵּין בַּתְּחִלָּה, בֵּין בָּאֶמְצַע, בֵּין בַּסּוֹף מִשּׁוּם מַתָּנָה — דְּבָרָיו קַיָּמִין.  הָאוֹמֵר ,,אִישׁ פְּלוֹנִי יִירָשֵׁנִי”, בְּמָקוֹם שֶׁיֶּשׁ בַּת; ,,בִּתִּי תִירָשֵׁנִי”, בְּמָקוֹם שֶׁיֶּשׁ בֵּן — לֹא אָמַר כְּלוּם, שֶׁהִתְנָה עַל מַה שֶּׁכָּתוּב בַתּוֹרָה. רַבִּי יוֹחָנָן בֶּן בְּרוֹקָה אוֹמֵר: אִם אָמַר עַל מִי שֶׁהוּא רָאוּי לִירֻשָּׁה — דְּבָרָיו קַיָּמִין; וְעַל מִי שֶׁאֵין רָאוּי לִירֻשָּׁה — אֵין דְּבָרָיו קַיָּמִין.  הַכּוֹתֵב אֶת נְכָסָיו לַאֲחֵרִים וְהִנִּיחַ אֶת בָּנָיו — מַה שֶּׁעָשָׂה עָשׂוּי, אֲבָל אֵין רוּחַ חֲכָמִים נוֹחָה הֵימֶנּוּ. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר: אִם לֹא הָיוּ בָנָיו נוֹהֲגִין כַּשּׁוּרָה — זָכוּר לְטוֹב.
One who says, “That man, my firstborn son, shall not take a double share,” [or] “That man, my son, shall not inherit with his brothers,” —- has not said anything, because he has stipulated [contrary] to what is written in the Torah.  One who appor-tions his estate to his sons orally, increasing [the share of] one and decreasing [the share of] one, or making the firstborn equal to them, his words are upheld. But if he said [that it was to be] by inheritance, he has not said anything. [If] he wrote —- whether in the beginning, the middle, or the end —- [that it was to be] a gift, his words are upheld.  One who says, “That man shall inherit me,” in a case in which there is a daughter, [or] “My daughter shall inherit me,” in a case in which there is a son, he has not said anything, because he has stipulated [contrary] to what is written in the Torah. R' Yochanan ben Ber-okah says: If he said [this] about one who is eligible for the inheritance, his words are upheld; and [if] about one who is not eli-gible for the inheritance, his words are not upheld.  One who signs over his property to another and sets aside his sons, what he did is done, but the Sages are not pleased with him. Rabban Shimon ben Gamliel says: If his sons did not conduct themselves properly, he is remembered for good.