我可以Infinity
通过NaN
n = 9.0 / 0 #=> Infinity
n.class #=> Float
m = 0 / 0.0 #=> NaN
m.class #=> Float
但是当我想访问Infinity
或NaN
直接访问时:
Infinity #=> uninitialized constant Infinity (NameError)
NaN #=> uninitialized constant NaN (NameError)
Infinity
和是什么NaN
?它们是对象、关键字还是其他东西?