Midrash for Job 34:25
לָכֵ֗ן יַ֭כִּיר מַעְבָּֽדֵיהֶ֑ם וְהָ֥פַךְ לַ֝֗יְלָה וְיִדַּכָּֽאוּ׃
Therefore He taketh knowledge of their works; And He overturneth them in the night, so that they are crushed.
Bereishit Rabbah
"Hashem said, “I will blot out from the earth the men (Genesis 6:7)": "Truly, He knows their deeds; Night is over, and they are crushed (Job 34:25)". Rabbi Chanina asked Rabbi Yonatan, and said to him: "Why is it written: "Truly, He knows their deeds""? Rabbi Yonatan answered him: "The Holy One, blessed be He, did not collect from the wicked up to the one calling out verdicts down upon them, and after that he punished them, that the Holy One, blessed be He, transform day into "night" and he prepared them for punishment, and after that he punished them. So, in the beginning: "Hashem saw how great was man’s wickedness on earth (Genesis 6:5)" and after this: "And Hashem regretted that He had made man on earth (Genesis 6:6)" and only after this "Hashem said, “I will blot out from the earth the men which I created".
Ask RabbiBookmarkShareCopy