Fifth printing. Updated for Ruby 1.9.3. For a complete list of updates and fixes, please see errata.
This release fixes all outstanding errata. It also removes the (now deprecated) iconv library documentation.
In preparation for a new printing of the paper book, we’ve experimented with a new layout. With slightly different typography and a new style for the standard library reference, the book now has about 10% fewer pages while retaining the same content. Trees around the world sleep better tonight.
Let us know what you think. (And, if we’ve introduced any errors in the process, please add errata.)
Addressed pending errata, and updated for the minor changes in RUby 1.9.3:
Fixes errata reported up until late April.
Fixed some minor errata. Main purpose of release is to prepare for a new printing.
We finally worked out the hyperlinking problems that caused some cross references to land on the incorrect page.
No content changes were made.
This is the version that has gone to the printers.
A big ”Thank you” to everyone who has contributed feedback and suggestions during the creation of this book.
Now Ruby 1.9.1 has shipped, we’re getting close to the final book:
I know there’s a problem with some cross references: we’ll fix those soon.
We’re getting close to being complete. Ruby 1.9 is stabilizing, and the book reflects the very latest build.
Perhaps the smallest change in this release is also the biggest. This book is no longer the third edition of Programming Ruby. Instead, it’s the first edition of Programming Ruby 1.9. We made this change because it seems likely that Ruby 1.8 will continue to be used for several years after the release of 1.9, and we wanted people to be able to get the 1.8 book during that time. If we’d called it a third edition, then book sellers would pull the existing book from their shelves.
Other changes in this B1.12 release:
There’s a full list of changes in chapter 1, but this release has two separate thrusts.
1. All the recent library changes (including Symbol’s move away from being immediate and relative_require) are now in.
2. I’ve decided to rewrite the tutorial. It follows the same structure, but I wanted to bring it more up-to-date and use some real-life examples.
The major change in this release is the update of the complete standard library documentation (these are the libraries that come with Ruby that you have to
require into your programs. There are a lot of changes:
base64library has been removed. Use
Rationallibraries are now built in to the interpreter. However, requiring the external libraries adds additional functionally. In the case of
Rational, this functionality is minimal.
CMathlibrary has been added.
Enumeratorlibrary is now built in.
Fiberlibrary (adds coroutine support to fibers).
Generatorlibrary has been removed (use Fibers).
irbfrom inside applications.
jcodeis removed in favor of built-in encoding support.
jsonlibrary is added.
matrixlibrary no longer requires that you include
mutexlibrary is now built in.
parsedatehas been removed. The
Dateclass handles most of its functionality.
readbyteshas been removed.
IOnow supports the method directly.
shelllibrary, as it seems more like a curiosity than something folks would use (and it’s broken under 1.9).
soaplibrary is removed.
synclibrary. It is broken under 1.9, and the
monitorlibrary seems to be cleaner.
Win32APIis now deprecated in favor of using the
This release finishes the update of the standard library, adding 6 new classes and either adding or updating the descriptions of hundreds of methods. See the Changes chapter for a description of other updates in this release.
For this release, I’ve replaced the old Classes and Objects chapter with a brand new chapter on the basics of metaprogramming.
Sorry this one took so long: I’ve been waiting for 1.9 HEAD to stabilize again—for the last 3 weeks I’ve been unable to build the book against it.
The change log is at the front of the book. I’ve updated standard classes and modules up to Integer, and updated the Encoding chapter to reflect the new 1.9 defaults.
Updated through to the end of Ruby in Its Setting.
Added a new chapter on Character Encoding
A temporary Chapter One contains the list of changes for this release