Errata for Programming Ruby 1.9 & 2.0 (4th edition)
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 B2.0, released about 1 month 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.
| Paper | Description | Found in | Fixed in | |
|---|---|---|---|---|
| X |
#50872: The footnotes are not fully displayed on kindle paperwhite.--Ze Jin Dave Thomas says: This would seem to be a problem with the Kindle, as they check out fine ofn other readers (including other Kindles) |
B1.0
25-Feb-13 |
||
| 9 |
#51262: The following sentence from the section "Source Code from This Book" has an extraneous "B":
Sometimes, B the listings of code in the book c...more...
|
B2.0
10-Apr-13 |
||
| 13 |
#51524: The flickr link in the notes is marked as private and redirects to the home page. --Fernando Paredes Dave Thomas says: It seems to work for me |
B2.0
15-May-13 |
||
| 24 |
#51525: You can use parentheses within patterns,
just as you can in arithmetic expressions, so you could also have written this pattern
like this:
...more...
Dave Thomas says: No, it's fine as it stands. It's a "P", followed by either "erl" or "ython"
|
B2.0
16-May-13 |
||
| 29 |
#51186: There is an example called "Book In Stock" in this chapter. "The row contains the book’s ISBN and price". But in the following sample csv (on ...more...
|
B2.0
02-Apr-13 |
||
| 50 |
#51429: In the second example for count the word frequency is a little mistake:
for i in 0..5
word = top_five[i][0]
count = top_five[i][1]
...more...
Dave Thomas says: The code in the book has 0...5 (three dots)
|
B2.0
01-May-13 |
||
| 56 |
#51364: The paragraph beginning "The each iterator has a special place in Ruby;, we'll describe..." has an extraneous comma; it should read "The each ...more...
|
B2.0
22-Apr-13 |
||
| 56 |
#51166: "The each iterator has a special place in Ruby; ," double punctuation, remove comma leave semicolon.
|
B2.0
01-Apr-13 |
||
| 75 |
#51181: "we start the server then call join *which* causes *it* to wait for the server to exit before itself exiting."
|
B2.0
02-Apr-13 |
||
| 77 |
#51187: The "Inheritance and Mixins" section has been placed in a chapter of "Modules", I think this section is irrelevant to "Modules". In the Kindle...more...
|
B2.0
02-Apr-13 |
||
| 105 |
#51445: Named matches only set local variables if the regular expression is on the left side of the expression (i.e., /RE/ =~ string). This paragraph...more...
|
B2.0
04-May-13 |
||
| 124 |
#51152: First sentence of "Hash and keyword arguments" section: "...using hashes as a way *of* passing..."--Dan Kee |
B2.0
29-Mar-13 |
||
| 127 |
#51261: We’ll talk more about if and caselater on page 137.
^
Insert space between keyword 'case' and link 'later o...more...
|
B2.0
10-Apr-13 |
||
| 160 |
#51450: ... and in detail on the book's web page at <link omitted>...
|
B2.0
05-May-13 |
||
| 161 |
#51163: Last sentence of first paragraph on page: "...we show only the first *three*"--Dan Kee |
B2.0
31-Mar-13 |
||
| 227 |
#51336: In the second paragraph, it says "eariler" instead of "earlier". |
B2.0
17-Apr-13 |
||
| 235 |
#51275: Footnote 3 says "bring" instead of "string". |
B2.0
11-Apr-13 |
||
| 311 |
#51418: Below discussion of %I, %Q and %W:
|
B2.0
29-Apr-13 |
||
| 315 |
#51366: last line: "Onigmo" instead of "Omigmo"!?--Harald Gegenfurtner Dave Thomas says: Onigmo is correct (I believe) |
B2.0
23-Apr-13 |
||
| 330 |
#51420: Line 3 of Table for the []= operator,
|
B2.0
30-Apr-13 |
||
| 332 |
#51421: Ranges in Boolean Expressions
Assume it should be 'expr2' after the dots in both cases.--Tim Passmore |
B2.0
30-Apr-13 |
||
| 338 |
#51517: def header example for illustrating **arg--this code doesn't work as expected. Line 3 should be something like\
attr_string = attrs.map {|k,v...more...
|
B2.0
15-May-13 |
||
| 338 |
#51422: Keyword Arguments
|
B2.0
30-Apr-13 |
||
| 347 |
#51518: In section 22.13 Paragraph 2:
"Braces have a high precedence; do has a low precedence. If the method invocation has parameters that are not...more...
|
B2.0
15-May-13 |
||
| 385 |
#51428: In the example involving classes Logger and Example, you state that the add_logging call in the declaration of class Example will define an in...more...
|
B2.0
01-May-13 |
||
| 407 |
#51229: In section 25.1, output of ObjectSpace.each_object looks incorrect--at the very least, it doesn't include the two float variables defined.--Dan Kee Dave Thomas says: Hmm... that's actually what Ruby 2.0.0 is returning. I've asked if it is a bug. And the answer is "No, it's a feature" Ruby 2 now makes most Floats immediate values on 64 bit architectures. I've updated the example and added a note. |
B2.0
04-Apr-13 |
||
| 435 |
#51319: In the PDF version of the book, it would be really handy if methods named in the "Mixes In" section of the class documentation were linked the...more...
Dave Thomas says: That's a nice idea, but I'm afraid it would be quite time consuming to implement.
|
B2.0
15-Apr-13 |
||
| 437 |
#51252: In the description of <=>, at the end of the second line, it says "If any pair arenot..." instead of "If any pair are not..."--Tom McCluskey |
B2.0
07-Apr-13 |
||
| 611 |
#51159: The description for #modulo contains a code snippet with what appears to be a superfluous "}": `num.divmod(}numeric)[1]`--Wayne Conrad |
B2.0
31-Mar-13 |
||
| 845 + |
#51225: You neglected to include the index in the epub (and presumably mobi) version of the book. This is quite disappointing, as (especially with a t...more...
Dave Thomas says: We don't include the indices in any of our mobi or epub books. We tried, but they were frankly unwieldy to use.
Our technology currently does index to the character-within-paragraph level (try them in the PDF eBook). But we're unlikely to add the to the other formats until the reader software gives us decent support.
|
B2.0
03-Apr-13 |
||
| 868 |
#51224: The index entry for "return" says "return, see also MethodThe ii tag should not be here."--Tom McCluskey |
B2.0
03-Apr-13 |

