Skip to content

Latest commit

 

History

History
59 lines (50 loc) · 2.19 KB

ruby-data-types.md

File metadata and controls

59 lines (50 loc) · 2.19 KB

Ruby 2.4 Data Types

  • Types
    • NilClass
    • Numeric
      • Integer
        • Fixnum (deprecated in Ruby 2.4)
        • Bignum (deprecated in Ruby 2.4)
      • Float
      • Rational (the r suffix was added in Ruby 2.1)
      • Complex (the i suffix was added in Ruby 2.1)
    • String
    • Regexp (? not sure)
    • Symbol
    • Range
    • Array
    • Hash

Class Hierarchy

Note: Since Ruby 2.1.0, Rational literals are available, like these: 0r, 2r/3, 2/3r.

Note: Since Ruby 2.1.0, Complex literals are available, like these: 0i, 1+0i, 1+1i.

Note: Since Ruby 2.4.0, Fixnum and Bignum are unified into Integer.

Note: It seems that there does not exist an official Ruby Language Specification. Therefore, the above information was gathered from various sources, including: