ruby 生成随机短信数字码

(0..9).to_a.shuffle[0..7].join.to_i

  

原文地址:https://www.cnblogs.com/lavin/p/12058856.html