In this tutorial, we will learn the basic syntax of Ruby language. We will go through the key components of a simple Ruby program.
Hello, World!
puts "Hello, World!"
puts
method to output the string "Hello, World!" to the standard output (usually the console).;
), but it's often omitted and optional.puts
and PUTS
would be considered different.#
for single-line comments or =begin ... =end
for multi-line comments.