English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Ruby Tutorial

Ruby, a simple and fast object-oriented (object-oriented programming) scripting language in20th century90s by Japanese Yukihiro Matsumoto (Yukihiro Matsumoto) developed, in compliance with the GPL agreement and Ruby License. Its inspiration and characteristics come from Perl, Smalltalk, Eiffel, Ada, and Lisp languages. Ruby itself has also developed other platform Ruby language substitutes such as JRuby (Java platform), IronRuby (.NET platform), and others. The author of Ruby was1993year2month24day began to write Ruby, until1995year12birthstone pearl (pearl) is the same, so Ruby is named after6birthstone pearl (pearl) is the same, so Ruby is named after7named after the birthstone ruby (ruby).

Ruby is an open-source object-oriented programming server-side script language in 20th century 9mid-0s by Japan's Matsumoto Yukihiro (まつもとゆきひろ/Yukihiro Matsumoto designed and developed it. In the Ruby community, Matsumoto is also known as Matz. Ruby can run on various platforms such as Windows, MAC OS, and various versions of UNIX.

Learn this tutorial, and you will have a comprehensive understanding of Ruby.

Now let's start learning Ruby!

Who is Suitable for Reading This Tutorial?

This tutorial helps beginners understand the basic knowledge and concepts of the Ruby language.

Knowledge You Need to Know Before Reading This Tutorial:

Before you start practicing the various examples provided in this tutorial, it is best to have a basic understanding of computer programs and programming languages, which will help you learn this tutorial.

Compile/Execute Ruby Program

For most programming languages, the first入门example is "Hello World!". The following example uses Ruby to output "Hello World!":

Online Example

#!/usr/bin/ruby
 
puts "Hello World!";

Click the "Run Example" button to view the online example execution results.

Or in the irb interactive command line mode:

>>puts "Hello, world!"
Hello, world!
=> nil