All strings in Ruby are objects of the String class, as you can discover by calling a string's class method : Object in Ruby « Class « Ruby






All strings in Ruby are objects of the String class, as you can discover by calling a string's class method



puts "Hello, world!".class

 

Related examples in the same category

1.Everything is an object or object-oriented in Ruby.
2.abs absolute value method
3.Get the modules Object class belongs to