Numerics[edit | edit source] 123 # Fixnum -123 # Fixnum (signed) 1_123 # Fixnum (underscore is ignored) -543 # Negative Fixnum 123_456_789_123_456_789 # Bignum 123.45 # Float 1.2e-3 # Float 123.45r # Rational, introduced in ruby 2.1 0xaabb # (Hexadecimal) Fixnum 0377 # (Octal) Fixnum -0b1010 # (Binary [negated]) Fixnum 0b001_001 # (Binary) Fixnum ?a # ASCII character code for 'a' (97) ?\C-a # Cont