We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

The latest version of the book is B1.10, released 18 days ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
29
#30570: you should add the "Ruby One-Click Installer for Mac OSX" to your list of osx ruby distributions. see the project on rubyosx.com -- furthermor...more...
B1.03
24-Jan-08
37

#34022: code illustrating "shebang" includes puts "Hello, world!", but the output shown is "It is now.......

may be confusing to new folk--Al Thomas

B1.09
15-Aug-08
50
#34295: When describing the '|' character in the regular expression /Perl|Python/, you refer to it as a "pipe character". "Pipe" describes the charac...more...
B1.10
29-Aug-08
60
#34138: Integer(price * 100) Price = 33.8 Price in cents = 3379 To me this just seems wrong. If I am a store owner I would loosing money here... ...more...
B1.10
20-Aug-08
60
#33198: It looks like you're trying to keep a clean set of numbered "tutclasses_##.rb" files. But it seems a little strange that we have a java class ...more...
B1.09
25-Jul-08
65
#33199: It looks like you're trying to have a cleanly numbered set of "tutclasses_##.rb" files, but in the example on this page we're calling the file...more...
B1.09
25-Jul-08
66

#34310: The code on 66-67 does not work. Error line 11 Csv_reader.--Ron Green

B1.10
31-Aug-08
72

#33046: The bookmark "Inheritance and Messages" does not lead to that section on page 72 but links to the box "Inheritance and Mixins" on page 78

B1.09
14-Jul-08
73
#33590: My problem may well be that I am still running 1.8.6, but I can't see why c.say_hello would return two responses. In 1.8.6 at least, it only r...more...
B1.09
05-Aug-08
91

#34147: Middle paragraph: "...and a block parameter (arguments starting with an ampersand)."
Should "arguments" be plural or singular here?--Charlie O'Keefe

B1.10
20-Aug-08
94

#34144: Near bottom: duplicate duplicate "that that"--Charlie O'Keefe

B1.10
20-Aug-08
101

#34145: Footnote 6: Should "conventially" be "conventionally"?--Charlie O'Keefe

B1.10
20-Aug-08
141

#34149: Toward end: "Arrays, support this:"
Should this be, "Arrays support this:" (without the comma)?--Charlie O'Keefe

B1.10
20-Aug-08
152
#34152: Last paragraph: "The === operator is defined in Class to test if the argument is an instance of the receiver or one of its superclasses." T...more...
B1.10
20-Aug-08
157

#34151: Paragraph in middle of page: "they typically make most sense when..."
How about: "they typically make THE most sense when..."--Charlie O'Keefe

B1.10
20-Aug-08
204
#34322: > Then, as you fill in the code, the specs mutate into tests that validate your code meets your expectations. Revise 'meets your expectatio...more...
B1.10
02-Sep-08
204
#34154: 3rd paragraph: "you can even mix Shoulda tests for regular test::Unit test methods." How about: "you can even mix Shoulda tests into regular ...more...
B1.10
20-Aug-08
204

#34176: In the first line, it should be 'user stories' instead of 'user stores'--Stefan Lembach

B1.10
22-Aug-08
205

#34133: In the first full paragraph on the page, fourth sentence, unlike LIFE not like.--David Johnson

B1.10
20-Aug-08
208
#34130: Word missing in first paragraph after "Anyone for Shoulda?": You [word missing] much of the descriptive power of RSpec-style expectations wit...more...
B1.10
20-Aug-08
208

#34131: "Should" should be "Shoulda" in second paragraph under "Anyone for Shoulda?":
Install Should[a] using gem install Shoulda.--Dirk Groten

B1.10
20-Aug-08
209

#34155: Near bottom: "[1, 9 in t.rb"
Looks like it's missing a closing bracket...--Charlie O'Keefe

B1.10
20-Aug-08
211

#34332: s/I;d/I'd/--Rob Holland

B1.10
03-Sep-08
211

#34172: "so I;d recommend a quick web search rather.. "
should be "so I'd recommend a quick web search rather.."

--Kyo Endo

B1.10
21-Aug-08
234

#34174: "HEre we can just use rm"
should be "Here we can just use rm"--Kyo Endo

B1.10
21-Aug-08
242

#34175: ".. options.rb file inslde a directory named anagram.."
should be ".. options.rb file inside a directory named anagram"--Kyo Endo

B1.10
22-Aug-08
243
#34157: Footnote 3: "We talk about Shoulda starting on page ??. For now, you can run this code by installing the gem using gem install Shoulda." I ...more...
B1.10
20-Aug-08
245

#34158: Top of "require_relative and Ruby 1.8" sidebar: "you can use still use" (extra 'use' in there)--Charlie O'Keefe

B1.10
20-Aug-08
247

#34159: "Now all our files are in place, we can..."
How about:
"Now THAT all our files are in place, we can..."--Charlie O'Keefe

B1.10
20-Aug-08
250
#34160: 4th-to-last paragraph: "The s.executables line tells Gems to install the anagram command-line script the Gem gets installed on a user's machin...more...
B1.10
20-Aug-08
253

#34185: "Tama" sounds strange to me for a Japanese female name, but for a Japanese cat's name. Mai, Hana, Yui are much better... I dont know...--Kyo Endo

B1.10
22-Aug-08
255

#34162: Near end of "Source Files" section: "For UTF-8. If Ruby sees the byte sequence..."
I'm guessing this should be a comma after "For UTF-8"?--Charlie O'Keefe

B1.10
20-Aug-08
295

#34198: The description for CGI.escapeElement says; "Here only the A element is escaped; other elements are left alone." but <hr> element is also escaped.--Kyo Endo

B1.10
23-Aug-08
302

#34164: First paragraph: "...as if the template is eing evaluated..."
Change "eing" to "being"--Charlie O'Keefe

B1.10
20-Aug-08
376
#34268: (for example, by invoking items.size, the process is surprisingly similar. should be (for example, by invoking items.size), the process is...more...
B1.10
27-Aug-08
376

#34287: "The ony change—and it’s a vitally important one" should say "The only change—and it’s a vitally important one"--Stephen Anderson

B1.10
28-Aug-08
391
#34284: sample code uses attr_reader for defining an accessor method. But I feel that using instance_variable_get method is appropriate in this contex...more...
B1.10
28-Aug-08
397

#34293: title of "instance_eval and class_eval" on the side panel is linked to page 398, not 397.--Kyo Endo

B1.10
29-Aug-08
398
#34294: When you define a class method in the block of class_eval for MyClass, it become a class method of MyClass. When you define an instance metho...more...
B1.10
29-Aug-08
403
#34308: "you application will silently ignore calls to unknown methods in your class." should be "your application will silently ignore calls to unk...more...
B1.10
30-Aug-08
403

#34309: "The OpenStructclass is distributed with Ruby."
should be
"The OpenStruct class is distributed with Ruby."
--Kyo Endo

B1.10
30-Aug-08
404

#34311: If you explain about MY_CLASS constant in your code, it would be helpful.--Kyo Endo

B1.10
01-Sep-08
404

#34312: to make it clearer that these methods are added after the method calling, how about adding a following code?
p MyOpenStruct.instance_methods
--Kyo Endo

B1.10
01-Sep-08
404

#34313: "define_method—it’s defined in class Object."
should be
"define_method—it’s defined in class Module."--Kyo Endo

B1.10
01-Sep-08
404
#34317: you says "Class BasicObject does not include the method define_method". but you can call it because the class of BasicObject is Class class,...more...
B1.10
02-Sep-08
407

#34326: how about adding following codes?
p Example.methods(false)
p Example.instance_methods(false)

--Kyo Endo

B1.10
02-Sep-08
428
#32757: In the table of contents, the “Array” and similar sections are on the same level than the “Built-in Classes and Modules” section, thus, it is ...more...
B1.09
09-Jul-08
447

#34171: in frozen?
"or it it is in" should be "or if it is in"--David Barta

B1.10
21-Aug-08
453

#34274: Appear to be missing 'sort' (have 'sort!), and 'sort_by' methods.

(Dave says: sort is defined in Enumerable)--Garold L Johnson

B1.10
27-Aug-08
480

#34275: 'each_with_index' overlaps the description (at least in the pdf).--Garold L Johnson

B1.10
27-Aug-08
534
#34210: In the first sentence on page 534 there is a double 'an': "Modes can be represented an an integer formed by or-ing together values from Tab...more...
B1.09
24-Aug-08
541
#34211: Description of each_byte needs to be separated into two lines. Line reads: "io.each_byte {| byte | block } →nilio.each_byte → enum" but sho...more...
B1.09
24-Aug-08
549
#34253: In the IO#gets section, you have this sentence:(although the setting of $_ is considered ugly, an may be removed in future). The word "an" is ...more...
B1.10
26-Aug-08
579

#34318: > Returns the regexp object for the regular expression that cerated match.

s/cerated/created--Emiel van de Laar

B1.10
02-Sep-08
648

#34319: > Returns true if obj lines between the start and end of the range.

s/lines/lies--Emiel van de Laar

B1.10
02-Sep-08
685

#34288: In 1.8, 'members' returns an array of strings rather than an array of symbols. Does this change in 1.9?--Garold L Johnson

B1.10
28-Aug-08
728

#34195: If has a
few incompatibilities with the original.

should read:

It has a
few incompatibilities with the original.--Stephen Anderson

B1.10
22-Aug-08
781
#30437: Chapter 28 (extending ruby) doesn't discuss the treading model in 1.9, and the big VM lock. I think this is a big change, and should be addres...more...
B1.03
10-Jan-08
791

#34289: 'tuples may be matched using regular expressions, the classes of their elements,' s/b '...expressions, or ...'--Garold L Johnson

B1.10
28-Aug-08