Infinity in ruby无穷大

  1. Infinity = 1.0/0
  2.  
  3. # a rather useless range
  4. everything = -Infinity..Infinity
  5. puts everything.includes?(5) #-> true
  6.  

原文地址:https://www.cnblogs.com/lexus/p/1940166.html