Examples from Programming Ruby book