Thuta Learning
BasicProgrammingbeginner

What is Ruby?

Relax. We'll talk through this in plain words — no textbook voice.

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".upcase

The 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 RUBY

Info

In Ruby, even a number like 1 is an object. That's why you can call a method like .next on it.

Easy traps

  • Just opening a Ruby file in a browser won't run it — you won't see any output. You need to run it from the terminal with ruby file_name.rb.
What is Ruby? | Thuta Learning