Updated: 11/16/2019 by Computer Hope
Ruby logo

Ruby is an open source object-oriented programming language developed by Yukihiro Matsumoto. The first version of the language (0.95) was released in 1995, and on December 25, 2021, version 3.1.0 was released.

Ruby is gaining popularity, and a framework called Ruby on Rails has helped to increase its usage for web programming. The Ruby language is completely object-oriented, in that everything is an object. For instance, even the most basic data types, like integers, have methods and instance variables. This provides a greater ability to use method chaining, where many lines of code can be consolidated into one. For example, if you wanted to use three different methods on a string, one way would be to write several lines of code, as shown below.

x = "Computer".reverse
y = x.upcase
z = y.downcase

These methods could instead be chained, as shown in the code below.

z = "Computer".reverse.upcase.downcase

Ruby is also a flexible language, because it allows programmers to make modifications to various parts of the language, if desired. More information on Ruby programming is available using the resources below.

How is Ruby used?

The most common use of Ruby is with web applications. Its main appeals is that programmers don't have to spend a lot of time setting up their files.

Object-oriented programing, Programming languages, Programming terms, <ruby>, Server-side scripting