Latest Pre-release in branch 1.9
1.9.3-p551
Released 13 Nov 2014
(11 years ago)
SoftwareRuby
Version1.9
Status
End of life
Initial release1.9.0
25 Dec 2007
(18 years ago)
Latest release1.9.3-p551
13 Nov 2014
(11 years ago)
End of bug fixes24 Feb 2014
(Ended 12 years ago)
End of life23 Feb 2015
(Ended 11 years ago)
Release notes https://ruby-lang.org/en/news/2014/11/13/ruby-1-9-3-p551-is-released/
Source codehttps://github.com/ruby/ruby/tree/v1_9_3-p551
Documentationhttps://ruby-doc.org
Downloadhttps://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p551.tar.gz
Ruby 1.9 ReleasesView full list

What Is New in Ruby 1.9

Ruby 1.9 was a significant evolution of the language, introducing a new virtual machine, a major syntax update, and a host of new core features. This release laid the groundwork for the modern Ruby we use today.

Category Key Changes
New Features New VM (YARV), New Hash Syntax, New Literals, Block Parameters
Syntax Changes New Block Scoping, Optional Hash Braces, Character Literals
Standard Library New RubyGems, New JSON Library, Psych (YAML)
Encoding M17n (Multilingualization) Support, Source Encoding
Deprecated / Removed ParseDate module, env value for safe_level

How did the VM and performance change in 1.9?

Ruby 1.9 replaced the old MRI interpreter with YARV (Yet Another Ruby VM). This was the single biggest change for performance. YARV uses a bytecode-based compilation model, which drastically speeds up execution compared to the AST-walking interpreter in 1.8.

In practice, you could expect most programs to run 2-3 times faster. This was a game-changer for Ruby's viability in larger applications and helped pave the way for frameworks like Rails to handle more scale.

What new syntax did Ruby 1.9 introduce?

The new hash literal syntax was the most visible change. It allowed using a colon (:) instead of the hash rocket (=>) for symbol keys, making hashes much cleaner to write.

# Old 1.8 style
old_hash = { :key => :value }

# New 1.9 style
new_hash = { key: :value }

Block parameters gained a powerful new syntax for declaring local variables. This made blocks more self-contained and predictable by preventing variable leaks into the outer scope.

How did encoding and internationalization work?

Ruby 1.9 introduced M17n (Multilingualization), a completely new system for handling string encodings. Every string now has an associated encoding, making Ruby much better at handling non-ASCII text.

You could specify a source file's encoding with a magic comment at the top. This was crucial for using Unicode literals in your code.

# encoding: utf-8
string = "ã"ã‚"にちは"

What was new in the standard library?

RubyGems was finally bundled with the interpreter, which meant you no longer had to install it separately. This made dependency management a standard part of the Ruby experience out of the box.

The library saw major additions like the json gem and the psych YAML parser, which replaced the older syck. The prime library was also added for working with prime numbers.

FAQ

Is Ruby 1.9 backward compatible with 1.8?
Mostly, but not entirely. While many programs will run unchanged, there are breaking syntax changes (like new block scoping) and removed features. You should test your application thoroughly before upgrading.

What is the most important change for a developer to know?
The new hash syntax and the block-local variables. The hash syntax is everywhere and you'll see it immediately. The block scoping change can fix subtle bugs but might break existing code that relied on the old behavior.

How do I specify the encoding of a source file?
Use a magic comment on the first line of the file. The most common one is # encoding: utf-8. If the first line is a shebang (#!/usr/bin/env ruby), the magic comment goes on the second line.

Was the standard library structure changed?
Yes. Many standard libraries that were previously pre-installed, like soap, xsd, and xmlrpc, were moved to external gems. You now need to explicitly add them to your Gemfile.

What happened to the ParseDate module?
It was deprecated and eventually removed. The recommended way to parse dates is to use the Date.parse method from the date standard library instead.

Releases In Branch 1.9

VersionRelease date
1.9.3-p55113 Nov 2014
(11 years ago)
1.9.3-p55027 Oct 2014
(11 years ago)
1.9.2-p33019 Aug 2014
(11 years ago)
1.9.3-p54716 May 2014
(12 years ago)
1.9.3-p54524 Feb 2014
(12 years ago)
1.9.3-p48422 Nov 2013
(12 years ago)
1.9.3-p44827 Jun 2013
(12 years ago)
1.9.3-p42914 May 2013
(13 years ago)
1.9.3-p39222 Feb 2013
(13 years ago)
1.9.3-p38506 Feb 2013
(13 years ago)
1.9.3-p37417 Jan 2013
(13 years ago)
1.9.3-p36225 Dec 2012
(13 years ago)
1.9.3-p32709 Nov 2012
(13 years ago)
1.9.3-p28612 Oct 2012
(13 years ago)
1.9.2-p32021 Apr 2012
(14 years ago)
1.9.3-p19420 Apr 2012
(14 years ago)
1.9.3-p12516 Feb 2012
(14 years ago)
1.9.331 Oct 2011
(14 years ago)
1.9.3-rc124 Sep 2011
(14 years ago)
1.9.3-preview101 Aug 2011
(14 years ago)
1.9.2-p29015 Jul 2011
(14 years ago)
1.9.2-p13625 Dec 2010
(15 years ago)
1.9.218 Aug 2010
(15 years ago)
1.9.1-p43016 Aug 2010
(15 years ago)
1.9.2-rc211 Jul 2010
(15 years ago)
1.9.1-p42902 Jul 2010
(15 years ago)
1.9.2-rc102 Jul 2010
(15 years ago)
1.9.1-p37607 Dec 2009
(16 years ago)
1.9.1-p24320 Jul 2009
(16 years ago)
1.9.2-preview120 Jul 2009
(16 years ago)
1.9.1-p12912 May 2009
(17 years ago)
1.9.130 Jan 2009
(17 years ago)
1.9.1-preview128 Oct 2008
(17 years ago)
1.9.025 Dec 2007
(18 years ago)