Bed trick
The bed trick is a plot device in traditional literature and folklore; it involves a substitution of one partner in the sex act with a third person (in the words of Wendy Doniger, "going to bed with someone whom you mistake for someone else"). In the standard and most common form of the bed trick, a man goes to a sexual assignation with a certain woman, and without his knowledge that woman's place is taken by a substitute. In traditional literature. Instances of the bed trick exist in the traditional literatures of many human cultures. It can  be found in the Old Testament: in Genesis Chapter 29 Laban substitutes Leah for Rachel on Jacob's wedding night, as Jacob discovers the following morning. Other examples range throughout the Western canon (several occur in Arthurian romance, as well as in Chaucer's "The Reeve's Tale") and can be paralleled by instances in non-Western cultures. Renaissance. For modern readers and audiences, the bed trick is most immediately and most closely associated with English Renaissance drama, primarily due to the uses of the bed trick by Shakespeare in his two dark comedies, "All's Well That Ends Well  and Measure for Measure". In "All's Well That Ends Well", Bertram thinks he is going to have sex with Diana, the woman he is trying to seduce; Helena, the protagonist, takes Diana's place in the darkened bedchamber, and so consummates their arranged marriage. In this case, the bed trick derives from Shakespeare's non-dramatic plot source, the ninth story of the third day in the "Decameron" of Boccaccio (which Shakespeare may have accessed through an English-language intermediary, the version in William Painter's "Palace of Pleasure"). In "Measure for Measure", Angelo expects to have sex with  Isabella, the heroine; but the Duke substitutes Mariana, the woman Angelo had engaged to marry but abandoned. In this case the bed trick was not present in Shakespeare's sources, but was added to the plot by the poet. The two uses of the bed trick by Shakespeare are the most famous in the drama of his era; they were emulated by more than forty other uses, however, and virtually every major successor of Shakespeare down to the closing of the theatres in 1642 employed the plot element at least once. The use of the bed trick in Middleton and  Rowley's "The Changeling", in which Diaphanta takes Beatrice-Joanna's place on the latter's wedding night, is probably the most famous instance outside of Shakespeare. Rowley also provides a gender-reversed instance of the bed trick in his "All's Lost by Lust", in which it is the male rather than the female partner in the sexual pair who is substituted. (Male versions of the bed trick are rarer but not unprecedented; a classical instance occurs when Zeus disguises himself as Amphitryon to impregnate Alcmene with the future Hercules. Similarly in Arthurian legend, Uther Pendragon takes the place  of Gorlois to impregnate Igraine with the future King Arthur.) Multiple uses of the bed trick occur in the works of Thomas Middleton, John Marston, John Fletcher, James Shirley, Richard Brome, and Thomas Heywood. Shakespeare employs the bed trick to yield plot resolutions that largely conform to traditional morality, as do some of his contemporaries; in the comic subplot to "The Insatiate Countess" (c. 1610), Marston constructs a double bed trick in which two would-be adulterers sleep with their own wives. Shakespeare's successors, however, tend to use the trick in more sensational and salacious ways. In Rowley's  play cited above, it leads to the mistaken murder of the substituted man. Middleton's "Hengist, King of Kent" features an extreme version of the bed trick, in which a woman is kidnapped and raped in darkness, by a man she doesn't realise is her own husband. Post-Renaissance. After theatres re-opened with the start of the Restoration era, the bed trick made sporadic appearances in plays by Elkanah Settle and Aphra Behn, and perhaps reached its culmination in Sir Francis Fane's "Love in the Dark" (1675); but in time it passed out of fashion in drama . Modern critics, readers, and audience members tend to find the bed trick highly artificial and lacking in credibility (though scholar Marliss Desens cites one alleged real-life instance of its employment in Shakespeare's era). In most contemporary legal systems the bed trick would be considered a form of rape by deception. In other media. In Richard Strauss's 1932 opera "Arabella", Zdenka/Zdenko, the daughter consigned to live as a boy because of family finances, contrives to pretend she is her sister Arabella to sleep with Matteo, with whom she is secretly in love. The bed trick can be  seen in Eliza Haywood's novel "Love in Excess". The bed trick is used in Roald Dahl's story "The Great Switcheroo". A variation of the bed trick can also be seen in the movie "Revenge of the Nerds". The "Family Guy" episode "Peter-assment" features a farcical and unwieldy variation, with Peter hiding Quagmire and Mort under his clothes to have sex with his boss Angela. The bed trick is also used twice in the film "The Rocky Horror Picture Show".