Nepedia
Back to Discover
Advanced Reader
💻

Ruby (programming language)

technology Maturity 7-9 war conflict Next article →

This article covers sensitive topics: war_conflict. Parents can manage visibility in Parental Controls.

Ruby is a general-purpose programming language designed for high productivity and simplicity. It is a high-level language, which means it is designed to be easy for humans to read and write. Ruby is also interpreted, meaning a program called an interpreter runs the code. This interpreter uses garbage collection to manage memory and just-in-time compilation to increase speed. A unique feature of Ruby is that everything is an object. This includes primitive data types like integers and Booleans. Because everything is an object, every value has built-in abilities called methods.

Yukihiro Matsumoto
Yukihiro Matsumoto

The language works through several different programming paradigms. It supports procedural programming, which follows a sequence of steps. It also supports object-oriented programming, where code is organized around objects. Additionally, it supports functional programming. The design of Ruby is influenced by many other languages. Matsumoto drew ideas from Perl, Smalltalk, Eiffel, Ada, BASIC, and Lisp. He wanted to combine the practical utility of Perl with the object system of Smalltalk. He also wanted a core that resembled a simple Lisp language.

History began in 1993 when Yukihiro "Matz" Matsumoto conceived the idea in Japan. Before any code was written, Matz and Keiju Ishitsuka had an online chat to name the language. They considered the name "Coral" but eventually chose "Ruby." One reason for this choice was that a colleague had a ruby as a birthstone. The first public release, version 0.95, was announced on December 21, 1995. This release included features like classes with inheritance, mixins, and exception handling. By 1997, the first article about Ruby was published on the Web. In 1998, Matsumoto launched the Ruby Application Archive and an English homepage. By the year 2000, Ruby was more popular than Python in Japan.

As Ruby grew, it became an international standard. In 2011, it was accepted as a Japanese Industrial Standard. In 2012, it became an international standard known as ISO/IEC 30170. Interest in the language surged around 2005 due to Ruby on Rails. Rails is a web framework written in Ruby that increased global awareness. Version 1.8 was a long-running stable version released in August 2003. It was eventually retired in June 2013. Version 1.9 followed, though it was only partially compatible with the older 1.8 version. This lack of compatibility meant many third-party gems had to be rewritten.

Ruby 2.0 was released on February 24, 2013. It was intended to be fully backward compatible with version 1.9.3, with only five known incompatibilities. Later versions like 2.2.0 introduced an incremental garbage collector. This tool helps manage memory more efficiently. Version 2.3.0 brought performance improvements to many parts of the language. It also added a "did_you_mean" gem to suggest correct names when a programmer makes a typo. Version 2.4.0 unified different number types into a single Integer class. These updates show how the language constantly evolves to be more efficient and helpful for developers.

A major milestone occurred on December 25, 2020, with the release of Ruby 3.0. This version was nicknamed "Ruby 3x3." The name signifies a goal for programs to run three times faster than in Ruby 2.0. To reach this speed, Ruby 3.0 uses MJIT, a just-in-time compiler. Later, YJIT was introduced to further enhance performance. Ruby 3.0 also focused on concurrency, which allows a computer to do many things at once. It introduced Ractor, a tool that is light-weight and thread-safe. Ractor achieves safety by exchanging messages instead of sharing objects.

Ruby On Rails Logo
Ruby On Rails Logo

Recent updates have continued to push the boundaries of what Ruby can do. Ruby 3.1 was released in December 2021 and included a new debugger. In 2022, Ruby 3.2 added support for WebAssembly via a WASI interface. This allows Ruby to run in new types of web environments. Ruby 3.3, released in 2023, introduced the Prism parser for better maintainability. It also added the RJIT, a pure-Ruby JIT compiler. The most recent major update, Ruby 3.4, was released on December 24, 2024. It includes a modular Garbage Collector and improves the YJIT compiler. These continuous improvements ensure that Ruby remains a powerful tool for programmers worldwide.

708 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (2)
File:Ruby On Rails Logo.svg
Ruby On Rails Logo.svg
File:Yukihiro Matsumoto.JPG
Yukihiro Matsumoto.JPG
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.