some code about ruby practice