Ruby's 'real?' method returns true for NaN and Infinity. Is this a bug or intentional?

后端 未结 0 448
不知归路
不知归路 2020-12-02 02:46

I\'ve stumbled into a weird behaviour in Ruby where the real? method on numeric classes incorrectly returns true on NaN and Infinity.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题