Ruby was created by Yukihiro "Matz" Matsumoto in the 1990s. The core idea behind Ruby is to let developers enjoy writing code. The syntax is simple and often feels like reading an English sentence. In Ruby, numbers, strings, and arrays are all objects, so you can call methods on them directly.
ruby
# Everything in Ruby is an object, even numbers.
puts "Hello, Ruby!"
puts 1.next
puts "ruby".upcaseThe first puts prints text to the console. 1.next calls the next method on an Integer object, which returns 2. "ruby".upcase converts the string to uppercase.
You should see
Hello, Ruby! 2 RUBYInfo
In Ruby, even a number like 1 is an object. That's why you can call a method like .next on it.