Ruby
Ruby is a programming language created in Japan. Development began in 1993 and it was released publicly in 1995 by Yukihiro Matsumoto (known as Matz). The central axis of its design is "Programmer Happiness" — prioritizing human readability and enjoyment over machine convenience. This philosophy led a Japan-born language to receive international standardization (ISO/IEC 30170).
The Origin of the Name
The name "Ruby" comes from the gemstone, chosen as a nod to the programming language Perl (pearl). The idea was to name a language intended to follow Perl after another gemstone. The playfulness embedded in the name reflects the designer's sensibility.
In the early 1990s, Yukihiro Matsumoto worked with multiple languages daily and felt a persistent frustration: why were they so difficult to write in? Perl had expressiveness he appreciated, but its syntax was overly complex. Python was well-structured but lacked joy. From those observations came the decision: "I'll build the language I want to use."
1993–1995: The Birth of Ruby
On February 24, 1993, Yukihiro Matsumoto began developing Ruby during breaks from his regular work. This date is commemorated as Ruby's birthday.
The development environment was MS-DOS on an NEC PC-9800 series machine. The languages that influenced Ruby's design span a wide range.
| Influencing Language | What Ruby inherited |
|---|---|
| Perl | Powerful text processing, built-in regular expressions, the spirit of "There's More Than One Way To Do It" (TMTOWTDI) |
| Smalltalk | Pure object orientation where everything is an object — including the ability to call methods on numbers |
| Lisp | The concepts behind blocks and closures |
| CLU | The prototype for method calls with blocks (iterators) |
| Eiffel | The concept of Design by Contract (traces remain in method naming conventions) |
In December 1995, Ruby 0.95 was released on Usenet, followed shortly by Ruby 1.0. A community formed primarily around the Japanese mailing list (ruby-list).
Yukihiro Matsumoto's Design Philosophy
The most widely cited principle in Ruby's design is the "Principle of Least Surprise." However, Yukihiro Matsumoto himself emphasizes that this means "least surprise for me (Matz)" — not a universal standard for all programmers. It is about the designer choosing behaviors that feel natural to himself as a programmer.
The other pillar is "Programmer Happiness." Taking the stance that "computers should be slaves to humans, not the other way around," Yukihiro Matsumoto placed optional type declarations, optional parentheses, and tolerance for multiple coding styles at the core of Ruby's design.
| Design Principle | How it appears in Ruby |
|---|---|
| Least Surprise | Array length can be retrieved with either length or size — having only one option would cause "surprise" |
| Human-centered design | No type declarations, optional parentheses, multiple valid ways to write the same thing |
| Everything is an object | Methods can be called on numbers — for example, 42.times |
| Joy as productivity | The view that a language that's enjoyable to write leads to fewer mistakes |
Language Lineage and Influence
Ruby did not emerge in isolation. It was designed by studying the strengths of languages from the 1960s through the 1990s and synthesizing them into a unified whole.
| Derived / Related | Role |
|---|---|
| Ruby on Rails | Web application framework released in 2004 by David Heinemeier Hansson. The biggest contributor to Ruby's worldwide adoption |
| JRuby | A Ruby implementation that runs on the Java Virtual Machine (JVM), enabling integration with Java libraries |
| mruby | A lightweight Ruby implementation led by Yukihiro Matsumoto, designed for embedded systems |
| Crystal | A statically typed compiled language inspired by Ruby's syntax (not compatible with Ruby) |
Milestones
| Year | Event |
|---|---|
| 1993 | Yukihiro Matsumoto begins developing Ruby (February 24) |
| 1995 | Ruby 0.95 released on Usenet. Ruby 1.0 released shortly after |
| 1999 | English-language outreach gains momentum. The ruby-talk mailing list is established |
| 2004 | Ruby on Rails released. Rapid adoption as a web framework begins |
| 2007 | Ruby 1.9 released. YARV (Yet Another Ruby VM) introduced, significantly improving execution speed |
| 2012 | Certified as ISO/IEC 30170:2012 — the first general-purpose language designed by a Japanese developer to receive international standardization |
| 2013 | Ruby 2.0 released (20th anniversary). Keyword arguments and Refinements introduced |
| 2020 | Ruby 3.0 released. Three pillars: JIT compiler, Ractor, and RBS |
| 2023 | Ruby 3.3 released. YJIT fully adopted, parser replaced with Prism |
Comparison with Contemporary Languages
From the mid-1990s through the 2000s, several dynamically typed scripting languages emerged around the same time as Ruby.
| Language | Released | Primary design focus | Difference from Ruby |
|---|---|---|---|
| Perl | 1987 | Text processing, Unix tooling | Complex syntax; TMTOWTDI taken to an extreme. Ruby inherited the expressiveness but organized the syntax |
| Python | 1991 | Readability, education | Indentation defines structure; promotes "one obvious way." Ruby allows multiple valid styles |
| Ruby | 1995 | Programmer happiness | Joy as the top priority. Defined by "Least Surprise" and everything-is-an-object |
| PHP | 1995 | Procedural scripting for the web | Easy HTML embedding; pragmatic focus on web backends |
Ruby Today
Ruby is widely used for web backend development. Development with Ruby on Rails is a common choice for startups and prototyping. Services such as GitHub, Shopify, Basecamp, and Cookpad were built with Rails.
mruby, led by Yukihiro Matsumoto, is used in embedded systems and IoT devices as a lightweight Ruby implementation for embedded Linux environments.
Ruby 3.x has made significant progress in performance and concurrency through JIT introduction, full adoption of YJIT, and the Ractor mechanism for parallel processing.
Common Misconceptions
"Ruby exists only for Rails"
The widespread adoption of Ruby on Rails created a strong "Ruby = Rails" association, but Ruby is a general-purpose language that stands on its own without Rails. It is used for CLI tools, automation scripts, embedded systems (mruby), and designing domain-specific languages (DSLs), among other purposes.
"Least Surprise means it matches everyone's intuition"
As Yukihiro Matsumoto himself has explained, "Least Surprise" is a principle based on the designer's own intuition. Programmers accustomed to other languages may find some Ruby behaviors counterintuitive. It is not a design that avoids surprise for every programmer.
"Ruby is slow"
The reputation of "Ruby = slow" took hold based on the Ruby 1.8 era, before YARV was introduced. Since Ruby 1.9's adoption of YARV, and the full integration of YJIT in Ruby 3.x (with reported speed improvements of 1.5× to 3× over MRI), performance has improved substantially.
Related Terms
| Term | Description |
|---|---|
| Ruby on Rails | A web application framework written in Ruby, released in 2004 by David Heinemeier Hansson |
| Matz | The handle of Yukihiro Matsumoto, Ruby's creator and BDFL (Benevolent Dictator For Life) |
| YARV | Yet Another Ruby VM — the bytecode virtual machine introduced in Ruby 1.9 |
| YJIT | A JIT compiler fully adopted in Ruby 3.1 and later, developed by Shopify |
| Ractor | A parallel execution mechanism introduced in Ruby 3.0, aiming to escape the constraints of the GIL (Global Interpreter Lock) |
| RBS | A language for writing type signatures introduced in Ruby 3.0; used with static analysis tools rather than runtime type checking |
| mruby | A lightweight Ruby implementation for embedded systems, led by Yukihiro Matsumoto |
| Gem | The unit of Ruby packages, published and distributed via RubyGems.org |
| Bundler | A tool for managing Gem versions on a per-project basis |
| irb | Interactive Ruby — a REPL for executing Ruby interactively in a terminal |