注意map不能直接修改原值,應(yīng)該使用枚舉器的原意,返回值才是。arr.map{|x| x*=10} #no use to arr正確的是arr_new =?arr.map{|x| x*=10}?