Learn the commonly used data types and operators in Ruby.
Data types in Ruby
Data types are classifications or categorizations of data items. They tell us what operations are often performed on specific data.
Common data types
Ruby supports three basic data types:
Integer
: Integer values (5
,0
,-1
, etc.)Float
: Floating-point values (2.33333
,-2500.001
, etc.)String
: String values (educative
,ruby
, etc.)
The following code demonstrates ...