THE BERACHAH ON FOOD THAT BECAME WORSE
Gemara
(Beraisa): One blesses sheha'Kol on moldy bread, on wine that became Koses (slimy), and on a cooked dish that changed form.
Berachos 36a (Rav Yehudah): One blesses Borei Pri ha'Adamah on wheat flour.
Support (Rava): Shmuel and R. Yochanan say that one blesses Borei Pri ha'Etz on olive oil. Even though it changed, its Berachah is the same. The same applies to flour!
38b (Rav Chisda citing Rav): One blesses ha'Adamah on Shelakos (cooked vegetables).
(Ula citing R. Yochanan): One blesses sheha'Kol.
(Rav Chisda himself): Anything for which we say (when raw) sheha'Kol, if it was cooked we say ha'Adamah.
(Rav Nachman bar Yitzchak): This refers to garlic and leeks.
Rav Nachman: Rav holds like R. Meir, who says that one may fulfill the Mitzvah of Matzah with a cooked wafer that did not dissolve. R. Yochanan holds like R. Yosi, who says that one is not Yotzei with it, for he holds that cooked bread is not called bread. Likewise, cooking changes the Berachah for food.
Rejection: No, all agree that one blesses ha'Adamah on Shelakos. R. Yosi disqualifies cooked Matzah, for it lost the taste of Matzah.
40b (Mishnah): One blesses sheha'Kol on Novlos.
These are scorched dates (they dried up due to the sun).
Rishonim
Rif (Berachos 27a): All agree that we bless ha'Adamah on Shelakos, even on garlic and leeks. Gourds get the blessing sheha'Kol when they are raw, and ha'Adamah if they were cooked.
Rambam (Hilchos Berachos 8:8): One blesses sheha'Kol on the following: moldy bread, wine that became Koses (slimy), a cooked dish that changed form, unripe figs, beer, vinegar...
Rosh (Berachos 6:15): We bless ha'Adamah on raw garlic or leeks. We bless sheha'Kol if they were cooked, for they changed for the worse. Even if a minority like them cooked more than raw, their opinion is Batel to the majority of people. Even though we normally eat them cooked, this is because the meat fat improves the taste.
Poskim
Shulchan Aruch (202:9): We bless sheha'Kol on Novlos, which are dates scorched and dried up by the sun.
Magen Avraham (21): Rashi connotes that this is because it changed for the worse.
Shulchan Aruch (OC 204:1): One blesses sheha'Kol on the following: moldy bread...
Mishnah Berurah (1): This is if it is slightly spoiled. If it totally spoiled and is not proper for people to eat, one does not bless on it at all, like we say later about a cooked food.
Bi'ur Halachah: The Rambam says that after all of these on which we bless sheha'Kol, including moldy bread, we bless afterwards Borei Nefashos. Since it is still edible, how do we exempt from Birkas ha'Mazon? Granted, we exempt from ha'Motzi beforehand, which is mid'Rabanan, since moldy bread is not important. How do we uproot the mid'Oraisa obligation of Birkas ha'Mazon? One can eat it in pressed circumstances! The Gemara (36b) equates Berachah to Yom Kipur. Eating such food on Yom Kipur is considered eating! One is liable for eating grapevines (81b). Presumably, this is not proper eating; they are eaten only in pressed circumstances. We find that one says the proper Berachah (202:2). Perhaps one blesses Borei Nefashos on moldy bread only if he did not eat to satiation, for then Birkas ha'Mazon is mid'Rabanan, but if he ate to satiation, he blesses Birkas ha'Mazon, even though he blessed sheha'Kol beforehand. We find that one who blessed Borei Minei Mezonos on cake says Birkas ha'Mazon afterwards if he ate enough. This requires investigation.
Shulchan Aruch (ibid): ...Wine that became Koses, a cooked dish that changed form and spoiled, Novlos, i.e. dates that were burned due to heat...
Beis Yosef (DH u'Mah she'Chosav Al ha'Tavshil): Surely, this is when it spoiled a little. If it totally spoiled, one does not bless on it at all.
Magen Avraham (2): The Bach says that the same applies to dates that fell off before fully ripening.
Shulchan Aruch (205:1): We bless ha'Adamah on raw garlic or leeks, and sheha'Kol if they were cooked.
Beis Yosef (DH veha'Rif): R. Yonah says that the Rif holds that Rav Chisda himself distinguishes between raw and cooked Shelakos, but Rav and R. Yochanan do not. We do not follow Rav Chisda against them. Rather, we bless ha'Adamah even if they are cooked. Why does the Tur say that the Rif holds that we bless sheha'Kol on raw garlic or leeks, and ha'Adamah if they were cooked, for they improved. The Rif equates garlic and leeks to Shelakos!
Taz (2): It seems that the Tur's text of the Rif did not say even garlic and leeks. Rather, it says 'we bless ha'Adamah on Shelakos. Garlic, leeks and gourds get the blessing sheha'Kol when they are raw...'
Magen Avraham (4): The Bach says to bless sheha'Kol even when they are raw. There is no necessity to say so.
Mishnah Berurah (5): The Shulchan Aruch discusses soft garlics. It is normal to eat them raw. Old garlics are very sharp. It is abnormal to eat them raw (without bread), so one blesses sheha'Kol. The same applies to onions. Sha'arei Teshuvah says that even when they are soft, one blesses ha'Adamah only in places where people eat soft raw garlic and onions without bread, and that one always blesses sheha'Kol on cooked garlic and onions, even if they are cooked with meat.
Rema: It is considered that they changed for the worse. Even if they were cooked with meat and improved, the improvement is not due to themselves, only due to the meat.
Taz (3): We bless ha'Etz on nuts fried in honey, even though the cooking makes them worse, and only the honey improves them! We must say that only the Berachah of Borei Peri ha'Adamah is lost through cooking, even if the food is improved through meat. Perhaps this is because the law was taught only for vegetables. Therefore, we bless ha'Etz on an Esrog fried in honey, or on compote of fruits, just like nuts. We distinguish among vegetables. We bless sheha'Kol on radishes fried in honey, for the cooking itself without the honey harms it, just like garlic and leeks. If we fry carrots, Rubin (beans), Kirvas (gourds), we bless ha'Adamah, for cooking improves them. This requires investigation.
Rebuttal (Tzlach 36a, before DH Hachi): Rava supported that we bless ha'Adamah on wheat flour from a ruling that one blesses ha'Etz on olive oil. According to the Taz, we do not learn (about a change for the worse) from Borei Peri ha'Etz to Borei Peri ha'Adamah!
R. Akiva Eiger: The Taz challenged himself from Tosfos.He could have asked from 38b, which tried to learn about Shelakos from olives!
Magen Avraham (5): We bless ha'Etz on fried nuts, for the nut is primary. The honey is just to sweeten the nut. There is no difference if we cook the nut in water or honey. Here, the meat is primary, and the garlic receives taste from it. Therefore, when we fry vegetables in oil, we bless ha'Adamah.
Kaf ha'Chayim (10): The Acharonim side with the Magen Avraham. The Taz himself wavered. Therefore, 'Safek Berachos Lehakel' does not apply here.
Kaf ha'Chayim (9): The Bach says that since there is an argument, we always bless sheha'Kol on garlic and leeks. The Taz distinguishes between when they are soft or hard. Perhaps it depends on the custom in different places. We bless sheha'Kol on cooked garlics, for we are lenient about Safek Berachos. Also, we see that cooking in water makes them worse. However, cooking improves onions, so they become ha'Adamah.
Mishnah Berurah (6): This is when they were cooked with another food. If one made a dish food out of onions themselves, e.g. he cooked them until they became dry and good to eat, he blesses ha'Adamah, for they improved.
Mishnah Berurah (7): If one cooked vegetables with meat, surely he intends also to eat the vegetables, so he blesses ha'Adamah, even if the vegetables get worse when cooked without meat. Here, the garlic was not put in the pot for itself, rather, only to give taste to the meat. Therefore, it gets the Berachah of the meat.