correct a ruby simple program