Self-reproducing programs in Ruby

Self-reproducing programs, if you've never heard of them, are fascinating objects. This is Ken Thompson's description in his classic 1983 Turing Award address:

In college, before video games, we would amuse ourselves by posing programming exercises. One of the favorites was to write the shortest self-reproducing program. [...]

More precisely stated, the problem is to write a source program that, when compiled and executed, will produce as output an exact copy of its source. If you have never done this, I urge you to try it on your own. The discovery of how to do it is a revelation ...