Original link: https://v3u.cn/a_id_257
Ruby is a strongly typed static language, that is, once an object is defined in Ruby, it will always be the data type if it does not pass a coercion operation, and the object data type will only be detected when the Ruby interpreter is running. Everything is an object (including nil-valued objects), and the specific data type of the object can be obtained by calling the built-in class attribute. For Ruby, all types inherit from the Object class (the root class is BasicObject). Number (Numeric) Number is one of the most basic data types. Ruby contains five built-in number type classes: Numeric, Integer, Float, Fixnum and Bignum. In addition, the standard library also provides three numerical types: Complex, BigDecimal, Rational. Except Nume…
This article is reprinted from: https://v3u.cn/a_id_257
This site is for inclusion only, and the copyright belongs to the original author.