“RACHAV” is the Hebrew name for Rahab, in Joshua Chapter 2.
Targum [referring to the Aramaic translation] renders “ZONAH” as PUNDIQTA which literally means seller of foods. Rashi understands the Targum literally, but Radak argues that Targum translated euphemistically; just as a food merchant will sell his products to anyone, so will a harlot sell hers. Abarbanel suggests that there is no contradiction between the two views. Typically, a woman who sold food [in an inn] was a harlot… Malbim suggests that the spies purposely went to Rachav’s house in order to maintain a low profile. Since the people in Canaan understood that harlotry was abhorrent to the Jews, they would never have suspected these two men of being from the Israelite camp. Alshich explains that the spies chose Rachav’s house because she was the paramour of the thirty-one Canaanite kings (Zevachim 116b, which further suggests not one prince or ruler existed who had NOT visited her) and was therefore privy to their thoughts. Arbarbanel, however, claims that the spies exercised poor judgment in visiting Rachav’s house; since their mission was to survey the Land, they should not have entered any houses. He maintains that because of this mistake they were punished by being detected and pursued. … The Midrash teaches that when the expression “his name” follows a person’s proper name in Scripture, this indicates that he was an evil person (e.g. I Sam 25;25). When the expression “his name” precedes a person’s name (e.g., his name was Elkanah I Sam 1:1). Why, then does this verse state “and her name was Rachav,” which would imply that Rachav was righteous. The Sages explain that when the two spies came to her house that night, she abruptly repented of her sins and totally refashioned her entire being. … and she even attained to the loft level of ruach hakodesh, a spiritual level close to prophecy, able to deduce this form the fact that Rachav was able to predict that the search party would return after three days. According to Megillah 14b, Rachav later converted to Judaism and married Joshua.
[ArtScroll Tanach Series: Joshua p 114]
Meam Loez (a Sephardic commentary) says that Rachav was both an innkeeper and a prostitute. It adds that she wanted to convert since she first heard of Israel, but the rulers of her city would not let her leave, and the visit of the spies was her long-awaited opportunity.
Meam Loez lists four reasons for going to Rachav:
1) The Jews visiting wouldn’t be suspected because they abhorred adultery. The two spies are identified in Midrash as Caleb and Pinchas, who would be above temptation.
2) They knew they would find the greatest concentration of travelers there
3) They hoped to get information from Rachav, due to her relationships with Canaanite kings.
4) The name “Rachav” is a good sign, meaning wideness, openness and generosity.
[Meam Loez on Joshua, pages 51-53]
Now, what about the “crimson thread”? In Joshua 2:15, she lets them down via a “CHEVEL”, a cord. In vs 19, the spies tell her to “bind this scarlet thread in the window”, the language is now “TIQVAT CHUT HA-SHANI”. Commentaries mention that “TIQVAT” is a cognate, or a least a remind of “TIQVAH” (hope, as in Israel’s national anthem – HA-TIQVAH). KAVAH, I believe can mean “line”, as in a phone-line. Rabbi Tatz, in his lectures, has described a “MIQVAH” as a “point of origin, when you emerge from the water” (the water standing for the medium, out of which the world was created, out of which came a differentiated world.) Genesis 1:9 syas “YIQAVU HA-MAYIM” (“Let the waters be gathered”). Apparently there are two root words QAF-VAV-HEI in Hebrew, one meaning “hope” and one meaning “gather”.
Meam Loez (page 65) says “Some say it was just a string, others say it was a piece of the hem of a garment, and others say it was the rope by which she let them down. … Why then is it called a string in this verse, adn in the verse above it was called a rope? Because it was as thin as a string, but by a miracle it became as strong as a rope…” It is also called a “line” as a reminder that by tying it in the window she can “hope” to be saved.
Meam Loez also adds that “SHNI” (“scarlet”) the color of the thread, could be an acronym for “SHMONAH NVI’IM YATZU” – “eight prophets came from her”. ArtScroll enumerates them: Nariah, Baruch, Serayah, Machsayah, Jeremiah, Chilkiah, Chanamel, and shalom (Megilla 14b)
Ruth ends with these verses:
Ruth 4:18-22 18 Now these are the generations of Perez: Perez begot Hezron; 19 and Hezron begot Ram, and Ram begot Amminadab; 20 and Amminadab begot Nahshon, and Nahshon begot Salmon; 21 and Salmon begot Boaz, and Boaz begot Obed; 22 and Obed begot Jesse, and Jesse begot David.
Despite the Rashi reference, above, most sources say Rahab married Salmon, and was the mother of Boaz, and thus in the lineage of King David. Wikipedia clarifies this confusion as follows:
Some Christian scholars have theorized that the Rahab described in Joshua is not the same person as the Rahab mentioned in Jesus’s genealogy. This is based on linguistic and textual evidence. Jewish legends claim that Rahab of Jericho married Joshua Bin Nun, a descendant of Joseph. For Christians, this can also be seen as an argument against her being the same Rahab in the Matthean genealogy – unless she married twice, to two different Israelite leaders of different tribes. This is possible, but not very likely (see Ginzberg, Legends of the Jews). Rahab who married Joshua was ancestress to Huldah, Jeremiah, Ezekiel, and other prophetesses and prophets. Rahab (Ῥαχάβ – no Ῥαάβ with Hebrews 11:31 and James 2:25) who married Salmon was ancestress to King David, all the kings of Judah, and Jesus. (http://en.wikipedia.org/wiki/Rahab)