Let's go through some of the data types in Ruby. You might be familiar with most of them.
Strings in Ruby are like strings in any other language. Though Ruby provides a lot of methods on the String object, for any string, you have a variety of handy methods such as
gsub, and so on.
You might have guessed what these methods do. Use irb to try out these methods and other methods on the
Numbers comprise of
Floats. Integers in Ruby are objects of the
Fixnum class while floats are objects of the
Apart from the standard mathematical operators that you can apply on these objects, there are various other methods such as the ...