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 P1.0, released 7 months 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
1

#78114: From Kado: "blocks/using.rb" on ch04 doesn't work because Ruby 2.x has "using" method for Refinements.

P1.0
29-Jan-15
1

#78115: ch03: There are "accounting" department and "purchasing" department are intermingled in the same context.

P1.0
29-Jan-15
1
#78117: Introduction : "Until Ruby 2.1, test-unit was a standard library. From Ruby 2.2 onward, you need to install it as a gem" isn't correct. 2.1 do...more...
P1.0
29-Jan-15
1
#78123: From Kado: "blocks/flat_scope_3.rb" on ch04 has a unwanted assertion method. It seems a test code for your self. And it needs two 'puts' in fr...more...
P1.0
29-Jan-15
1
#78213: "Try defining a method inside another method with def, and you’ll see that the new method is defined on the class of self." Not 100% accurate ...more...
P1.0
26-Feb-15
1

#78222: From Kado: Ch05: "Kernel#callers" => "Kernel#caller".

P1.0
02-Mar-15
1

#78073: The text should be updated for JRuby 9000 ("supporting Ruby 2.2, except for Refinements and a few other things").--Paolo Perrotta

Paolo Perrotta says: This was my own errata. Then I decided that the current text already makes adequate references to non-MRI interpreters, by warning the reader that some examples might not work. So I stopped running JRuby-specific tests.
P1.0
22-Jan-15
12

#77359: It says to install `test-unit` for ruby 2.2 or later. Isn't that version (2.2) a typo? We are on 2.1.--Jesus Rodriguez

Paolo Perrotta says: It's just a very new book, so I peeked in the ruby-head branch put in information that should become valid soon - as soon as Ruby 2.2 is out. :)
P1.0
18-Sep-14
30
#77280: I have a question about method lookup. You have said "one step to the right, then up", I think it is not exactly. If the object is a instanc...more...
Paolo Perrotta says: Marcus, class methods look like a special case - but they actually work the same way, even if that's not easy to see. In your example, Ruby goes one step to the right into B's class (which is Class), and then up. You'll find a detailed explaination in chapter Class Definitions.
P1.0
03-Sep-14
44
#77170: The code from example money_example.rb is deprecated, the money gem has bin split into money and monetize - method from_numeric must be used f...more...
Paolo Perrotta says: This is great info, Bart. Thank you - I'll update the book for the next batch of printings.
B4.0
07-Aug-14
55
#77935: For the refinement gotchas, using MyClassRefinement MyClass.new.my_method returns "original my_method()" for me instead of the "refine...more...
Paolo Perrotta says: I just tried the example with 2.1.1, and it works for me. I'll mark this as "not a problem" for now, but feel free to open a new one if the test fails on you on the original file. To run the test, run "ruby code/object_model/refinements_gotcha.rb".
P1.0
16-Dec-14
95

#78064: class_eval is used in an example, but it's only introduced later (on page 107).--Paolo Perrotta

P1.0
20-Jan-15
191
#78148: In the sentence "The only the first two methods include the new feature." there is an extra "The". "The only the first two methods include th...more...
Paolo Perrotta says: Fixed. Thanks.
P1.0
04-Feb-15
192
#77200: The last paragraph says: "Validation#save_with_validation returns false if the validation fails, or if the caller explicitly disables validat...more...
Paolo Perrotta says: You're right! I replaced "or if the caller" with "unless the caller".
B4.0
10-Aug-14
193
#77199: The sentence: "if the validation fails, and otherwise falls back to the original save_with_validation!." I think should be: "if the validatio...more...
Paolo Perrotta says: Right! Fixed.
B4.0
10-Aug-14
210
#77996: On 3rd paragraph: "(We discussed additional arguments to method_eval, such as __FILE__ and __LINE__, in The irb Example, on page 144.)" ...more...
Paolo Perrotta says: Fixed. Thanks you.
P1.0
30-Dec-14