examples from ruby book