Welcome to Koderuby
Ruby was created in 1993 by Yukihiro 'Matz' Matsumoto. Ruby is a dynamic programming language, it is interpreted by nature and a pure object-oriented language, but also suitable for procedural and functional programming styles.
Interpreted means that the language code is executed using an interpreter rather than a compiler.
Dynamically typed means that the types are bound at execution time rather than compile time. In
Ruby everything is an object, even simple numeric literals, boolean values, or
This make Ruby completely an object-oriented programming language.
Koderuby website is a collection of Ruby programming examples. It provides small programs, code snippets that will teach you how to program in Ruby. Come and visit us regularly to get the latest examples.
I Wayan Saryada
Latest Code Examples
Most Viewed Examples
How do I write Hello, World! program?
Let me introduce you to Ruby. Ruby is an object-oriented programming language that support dynamic programming styles. To start learning Ruby you'll need a Ruby interpreter installed in your computer. The small program below is the classic introductory program into programming language called Hello World.
Open your favorite text editor, type-in the following code and save it in a file called
.rb is the extension name use for a file to store Ruby source code.
# Print Hello, World! puts 'Hello, World!'
To run this program, execute the following command on the path where you store your
$ ruby hello.rb
And the result will print the following text on the terminal.