Related for Ketubot 9:1
הַכּוֹתֵב לְאִשְׁתּוֹ, דִּין וּדְבָרִים אֵין לִי בִנְכָסַיִךְ, הֲרֵי זֶה אוֹכֵל פֵּרוֹת בְּחַיֶּיהָ. וְאִם מֵתָה, יוֹרְשָׁהּ. אִם כֵּן לָמָּה כָתַב לָהּ דִּין וּדְבָרִים אֵין לִי בִנְכָסַיִךְ, שֶׁאִם מָכְרָה וְנָתְנָה, קַיָּם. כָּתַב לָהּ, דִּין וּדְבָרִים אֵין לִי בִנְכָסַיִךְ וּבְפֵרוֹתֵיהֶן, הֲרֵי זֶה אֵינוֹ אוֹכֵל פֵּרוֹת בְּחַיֶּיהָ. וְאִם מֵתָה, יוֹרְשָׁהּ. רַבִּי יְהוּדָה אוֹמֵר, לְעוֹלָם אוֹכֵל פֵּרֵי פֵרוֹת, עַד שֶׁיִּכְתֹּב לָהּ דִּין וּדְבָרִים אֵין לִי בִנְכָסַיִךְ וּבְפֵרוֹתֵיהֶן וּבְפֵרֵי פֵרוֹתֵיהֶן עַד עוֹלָם. כָּתַב לָהּ, דִּין וּדְבָרִים אֵין לִי בִנְכָסַיִךְ וּבְפֵרוֹתֵיהֶן וּבְפֵרֵי פֵרוֹתֵיהֶן בְּחַיַּיִךְ וּבְמוֹתֵךְ, אֵינוֹ אוֹכֵל פֵּרוֹת בְּחַיֶּיהָ. וְאִם מֵתָה, אֵינוֹ יוֹרְשָׁהּ. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר, אִם מֵתָה, יִירָשֶׁנָּה, מִפְּנֵי שֶׁהִתְנָה עַל מַה שֶׁכָּתוּב בַּתּוֹרָה, וְכָל הַמַּתְנֶה עַל מַה שֶּׁכָּתוּב בַּתּוֹרָה, תְּנָאוֹ בָטֵל:
If one wrote to his wife: "I have nothing to do with your property," he eats fruits in her lifetime, and if she dies, he inherits her. [If, while she were still betrothed, he wrote to her: When you get married to me, I have nothing to do with your property — even though they (the receivers) did not acquire it from him, she may sell it and give it as a gift, and the transaction stands. For a man may make a condition not to inherit an inheritance falling to him from elsewhere. And if they did acquire it from him, even after marriage her sale stands. But he eats fruits, and if she died, he inherits her. For this is what is implied, viz.: "I have nothing to do with your property, but I do have something to do with its fruits. And so long as it is your property, (i.e., during your lifetime) I have nothing to do with it. But after you die, I do have "something to do with it."] If so why does he write her: "I have nothing to do with your property"? So that if she sold it or gave it away, it (the transaction) stands. If he wrote her: "I have nothing to do with your property or its fruits," he does not eat fruits in her lifetime. And if she dies, he inherits her. R. Yehudah says: He always eats fruits of fruits, unless he writes: "I have nothing to do with your property, or its fruits, or the fruits of its fruits forever." [The gemara explains which are fruits and which are fruits of fruits. If she brought land in to him, and it produced fruits — these are fruits. If he sold these fruits for land, which produced fruits — these are fruits of fruits. If he tells her only: "I have nothing to do with your property or its fruits," he eats fruits of fruits according to R. Yehudah; for he "removed" himself only from fruits. The halachah is in accordance with R. Yehudah.] If he wrote her: "I have nothing to do with your property, or its fruits, or the fruits of its fruits in your lifetime or after your death," he does not eat fruits in her lifetime, and if she dies, he does not inherit her. R. Shimon b. Gamliel says: If she dies, he inherits her; for he made a condition contrary to what is written in the Torah; and if one makes a condition contrary to what is written in the Torah, the condition is void. [For it is written (Numbers 27:11): "And he shall inherit her" — whence it is derived that a man inherits his wife. But the conclusion is that a man's inheriting his wife is not a Scriptural but a rabbinical enactment and the (above) verse only serves as support — notwithstanding which the halachah is in accordance with R. Shimon b. Gamliel. Not because he makes a condition contrary to what is written in the Torah, but because the sages gave it "Torah strength."]