Ruby
termKept in this browser · My desk
Yukihiro Matsumoto's object-oriented scripting language, conceived on 24 February 1993 and released publicly in December 1995.
Matsumoto blended parts of his favourite languages, Perl, Smalltalk, Eiffel, Ada and Lisp, into a language designed for the programmer's comfort.
What it is. Ruby is a dynamically typed, interpreted, object-oriented scripting language in which everything is an object, in the Smalltalk tradition: numbers, strings, classes and code blocks all carry their own methods. Its creator, Yukihiro Matsumoto, known as Matz, recalled wanting "a scripting language that was more powerful than Perl, and more object-oriented than Python"; the project's frequently asked questions (FAQ) page summarizes it as good at text processing like Perl, with blocks, iterators and metaclasses like Smalltalk.
Origin. Matz's own account, posted in 1999 and kept in the FAQ, dates Ruby's birth to 24 February 1993, in a conversation with a colleague about an object-oriented scripting language; the interpreter took several months to run, with iterators, exception handling and garbage collection from the start and Perl's features reorganized into a class library. He posted Ruby 0.95 to Japanese domestic newsgroups in December 1995, the public release. The name is a jewel chosen in Perl's wake: pearl is the birthstone of June and ruby of July, and in typesetting pearl is 5 points and ruby 5.5. The About page says Ruby reached mass acceptance in 2006, when the Ruby-Talk mailing list averaged 200 messages a day, and credits much of its growth to the Ruby on Rails web framework.
How it works. Ruby made blocks and closures part of everyday code: methods take blocks of code, which is how Ruby iterates and how the FAQ's own example sorts a list; Rust's reference credits Ruby for its closure syntax and block syntax. The About page calls Ruby flexible because "essential parts of Ruby can be removed or redefined, at will", operators included, since they are syntactic sugar for methods; changing existing classes this way is called monkey patching. The reference implementation is called CRuby because it is written in C; Ruby 3.2 (25 December 2022) made its YJIT just-in-time (JIT) compiler production-ready on x86-64 and arm64 and added a port to the WebAssembly System Interface (WASI), and Ruby 4.0.0 (25 December 2025) introduced ZJIT, the next generation of YJIT, which needs Rust 1.85.0 or later to build, and Ruby Box, an experimental way to isolate definitions such as monkey patches and loaded libraries.
Standards and status. The core team ships a new series each Christmas, the last three on 25 December 2023, 2024 and 2025. On 23 November 2026 the maintenance page listed Ruby 4.1 in preview, 4.0 and 3.4 (released 25 December 2024) in normal maintenance, 3.3 in legacy maintenance, with end of life expected on 31 March 2027, and 3.2 and older at end of life.
What goes wrong. The interpreter's C code is attack surface. On 18 November 2026 the Ruby team disclosed seven vulnerabilities in its regular expression engine and in the case conversion of strings, heap buffer overflows, a double free, an integer overflow and out-of-bounds reads, warning that proofs of concept showed some could lead to remote code execution in applications that compile or match attacker-controlled patterns or change the case of crafted strings. Ruby 4.0.10, 3.4.13 and 3.3.14 fixed them; Common Vulnerabilities and Exposures (CVE) identifiers had been requested but not yet assigned, so the advisory used GitHub Security Advisory (GHSA) identifiers, and Ruby 3.2 and earlier receive no fixes. At the application level, Ruby's dynamism made object injection a classic: in CVE-2013-0156, Ruby on Rails before 2.3.15, 3.0.19, 3.1.10 and 3.2.11 converted parameters through YAML (YAML Ain't Markup Language) and Symbol type conversion, letting remote attackers inject objects and execute arbitrary code.
Implementations. The reference implementation is known in the community as MRI (Matz's Ruby Interpreter) or CRuby. Others include JRuby, which runs Ruby on the Java Virtual Machine (JVM) and uses its just-in-time compilers, garbage collectors and threads; TruffleRuby, on GraalVM; mruby, a lightweight implementation meant to be linked into and embedded within an application, whose development Matsumoto leads; and Rubinius, Ruby written in Ruby on top of LLVM. The About page stresses that Ruby is free to use, copy, modify and distribute, and portable across GNU/Linux, the Unix family, macOS and Windows.
What defenders can do. The advisory's advice is simply to upgrade. The affected versions were 3.3.13 and earlier, 3.4.0 to 3.4.12 and 4.0.0 to 4.0.9, so the first step is an inventory of Ruby runtimes, including those bundled with applications, and any series at end of life has to be replaced rather than patched. Four of the seven flaws are reached through attacker-controlled patterns, so applications that compile regular expressions supplied by users should be treated as running untrusted code through the interpreter.
Neighbours. Perl, whose job and name it followed; Smalltalk, its object model; Python, its closest rival; Rust, which took its closure syntax; interpreters and just-in-time compilation; memory safety, the property its C core lacks.
Also known as: ruby language, matz
Sources
- Ruby FAQ: Ruby was born on 24 February 1993 and released publicly in December 1995 (read 2026-11-23)
- About Ruby: Yukihiro Matsumoto blended Perl, Smalltalk, Eiffel, Ada and Lisp (read 2026-11-23)
- The Rust Reference, Influences: SML and OCaml, C++, Cyclone, Haskell, Newsqueak, Erlang, Swift, Scheme, C#, Ruby (read 2026-11-23)
- ruby-lang.org, Ruby Maintenance Branches (read 2026-11-23): Ruby 4.1 preview; 4.0 normal maintenance, released 2025-12-25; 3.4 normal maintenance, released 2024-12-25; 3.3 legacy maintenance, released 2023-12-25, EOL 2027-03-31 expected; 3.2 and older EOL
- ruby-lang.org, Security advisories: multiple vulnerabilities in Regexp and String case conversion, 18 November 2026 (read 2026-11-23): seven vulnerabilities, proofs of concept of remote code execution; fixed in 4.0.10, 3.4.13 and 3.3.14; CVE IDs requested, not yet assigned, GHSA IDs used; Ruby 3.2 and earlier not fixed
- ruby-lang.org, Ruby 4.0.0 Released, 25 December 2025 (read 2026-11-23): Ruby Box (experimental isolation of definitions, RUBY_BOX=1) and ZJIT, the next generation of YJIT, built with Rust 1.85.0 or newer
- ruby-lang.org, Ruby 3.2.0 Released, 25 December 2022 (read 2026-11-23): WASI-based WebAssembly support; production-ready YJIT on x86-64 and arm64
- NIST National Vulnerability Database API, CVE-2013-0156 (read 2026-11-23): Ruby on Rails before 2.3.15, 3.0.19, 3.1.10 and 3.2.11 allows object injection and arbitrary code execution through YAML and Symbol type conversion