small medium large xlarge

Errata for Programming Ruby (2nd edition)

 

The latest version of the book is P10.0, released over 9 years 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.

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

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (22-Sep-10)
#45139
PDF page: N/A
I tried to find the errata for the first edition of this book but I was unsuccessful. The free edition hosted at ruby-doc.org reads in section "Contai...more...
  • Reported in: P10.0 (31-Jan-07)
#26910
PDF page: xx

"and in particular covers" should be "and, in particular, covers"--Rich Morin

  • Reported in: P10.0 (08-Oct-07)
#29761
PDF page: 0
Dears Dave and Andy Follows some considerations about your extensible and complex book "Programming Ruby: The Pragmatic Programmer's Guide". 1) ...more...
  • Reported in: P10.0 (31-Jan-07)
#26909
PDF page: 2

"Linux distributions, and Mac" should be "Linux distributions and Mac"--Rich Morin

  • Reported in: P10.0 (03-Mar-07)
#27122
Paper page: 7
TO load a file in irb, you reference "code/rdoc/fib_example.rb" . This file and the directory structure does not exist in the example code..--Scott De...more...
  • Reported in: P10.0 (31-Jan-07)
#26911
PDF page: 8

"In particular you might" should be "In particular, you might"--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26914
PDF page: 10

"In Ruby, you--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26915
PDF page: 10

"for example, the name of the song" should be "for example, the name of a song"--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26916
PDF page: 10

"These instance methods in turn have" should be "These instance methods, in turn, have"--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26917
PDF page: 12

"The following lines are both equivalent." should be "The following lines are equivalent."--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26918
PDF page: 12

"In this case it--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26913
PDF page: 14
In the second paragraph, the wording isn't really strong enough. Ruby _enforces_ these conventions. "should all start" should be "must all start", et...more...
  • Reported in: P10.0 (08-Jun-10)
#43682
Paper page: 17

"The the keys and values in a hash can be..." it seems that second word "the" is a typo.--Artem Bezsmertnyi

  • Reported in: P10.0 (31-Jan-07)
#26912
PDF page: 22

"you--Rich Morin

  • Reported in: P10.0 (06-Aug-07)
#29389
Paper page: 26
Please change: song.inspect to puts song.inspect It is probably obvious to an experienced person, but not the person that is reading your book...more...
  • Reported in: P10.0 (31-Jan-07)
#26919
PDF page: 28

"in the real world objects often" should be "in the real world, objects often"--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26920
PDF page: 28

"We--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26921
PDF page: 29

"In Ruby you do that" should be "In Ruby, you do that"--Rich Morin

  • Reported in: P10.0 (02-Sep-07)
#29609
Paper page: 31
This errata is in the section titled "Objects and Attributes". On the top of p. 31, the book says: "In this example, we named the accessor method...more...
  • Reported in: P10.0 (03-Sep-07)
#29613
Paper page: 31
Here is an example that led me to an erroneous conclusion about whether attr_reader creates the instance variables: class Song attr_reader :n...more...
  • Reported in: P10.0 (31-Jan-07)
#26922
PDF page: 41

"the end position, and the three-period" should be "the end position; the three-period"--Rich Morin

  • Reported in: P10.0 (25-May-07)
#29133
Paper page: 46

Third line before last: "suggests a dequeue", I believe "deque" is intended.--Wing

  • Reported in: P10.0 (03-Jul-07)
#29299
PDF page: 48
In the code for the 'find' method of class Array, the word 'size' should be '@size', I believe, since size is presumably an instance variable of the A...more...
  • Reported in: P10.0 (26-Jul-10)
#44283
PDF page: 49

`while line = gets' does not return false, but instead nil. The assertion stated could cause confusion for new readers.

  • Reported in: P10.0 (17-Nov-10)
#45624
Paper page: 60

first para:
'is generated using and ....'
=> 'is generated using ...' (I think!)--Sam Dutton

  • Reported in: P10.0 (03-Sep-07)
#29612
Paper page: 66
In the example at the the top of p. 66, the variable song_file is undefined. It looks like the first line of the example should be something like: ...more...
  • Reported in: P10.0 (05-Apr-07)
#28352
PDF page: 66
"Similarly, the patterns \b and \B match word boundaries and nonword boundaries, respectively" would be clearer as "Similarly, the patterns \b and \B ...more...
  • Reported in: P10.0 (03-Sep-07)
#29614
Paper page: 67
In the example on the bottom of page 67, there is this line: include Comparable The include statement was not covered earlier in the book, and t...more...
  • Reported in: P9.0 (09-Oct-06)
#26194
Paper page: 69

in ruby 1.8.5 =~ does not automatically convert a string on the right side to a regular expression.

  • Reported in: P6.0 (16-Apr-07)
#28608
Paper page: 69
In the code for function show_regexp, the statements "#{$`}<<#{$&}>>#${$'}" and "no match" should be preceded by "puts", otherwise no output is prod...more...
  • Reported in: P10.0 (31-Mar-07)
#28216
Paper page: 70
The last sentence in the second paragraph under the section Anchors, in parentheses. in the book: ... string ends with a \n, it which case ... ...more...
  • Reported in: P10.0 (01-Jul-07)
#29295
Paper page: 74
The second last paragraph says "Whoever created it entered all the artists' names in lowercase.", and then goes on to explain how to make them mixed c...more...
  • Reported in: P10.0 (25-Jul-07)
#29366
Paper page: 75
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] context 'The obvious thing is to write str.gsum(/\\/, '\\\\') This actually DOES work. The ...more...
  • Reported in: P10.0 (07-Jun-10)
#43675
Paper page: 81
(Version of the book: 2007-09-13, P11.0) Page 81, in the fifth line from the bottom, "they must be methods..." should be "there must be methods..." ...more...
  • Reported in: P10.0 (17-Nov-10)
#45625
Paper page: 84

Font size is too small--Sam Dutton

  • Reported in: P10.0 (08-Sep-07)
#29640
Paper page: 96
On p. 96, there is an example that starts with this line: words[key] ||= [ ] ... and the text says: "The first line is equivalent to words...more...
  • Reported in: P10.0 (06-Nov-11)
#47905
Paper page: 99

Ruby classes are instances of Class, which defines === to test...

=== is defined in Module not in Class.--David Bone

  • Reported in: P10.0 (02-Jun-09)
#39302
PDF page: 99
In the custom until loop, "break if cond" will cause an error: "unexpected break (LocalJumpError)", probably because "def do_until" is a method and no...more...
  • Reported in: P1.0 (23-Feb-07)
#27026
PDF page: 104
The fact that empty rescue rescues StandardErrors should be more emphasized - a separate paragraph or a side box or at least bold font. It seems that ...more...
  • Reported in: P10.0 (02-May-07)
#28898
Paper page: 105

The do-it-yourself until loop throws a LocalJumpError from the break statement. It can be changed to a return statement.--Wing

  • Reported in: P10.0 (02-May-07)
#28899
Paper page: 109
When the raise statement (with no parameters) is called, the exception is rethrown. Can we say a few words about the type of the error? I believe it i...more...
  • Reported in: P10.0 (31-Jan-07)
#26904
PDF page: 114

"sum, when applied to strings it" should be "sum; when applied to strings, it"--Rich Morin

  • Reported in: P10.0 (04-Feb-15)
#78146
PDF page: 118
connection.download_mp3("jitterbug") {|p| show_progress(p) } The above line is a little confusing because the method show_progress is never men...more...
  • Reported in: P10.0 (10-Sep-07)
#29647
Paper page: 119
On p. 118-119 is this passage: If this made you think of class methods, your next thought may well be "what happens if I define instance methods wi...more...
  • Reported in: P10.0 (02-May-07)
#28900
Paper page: 119

Need to update the code given in the website (not in the book): it still uses id instead of object_id.--Wing

  • Reported in: P9.0 (17-Oct-06)
#26290
Paper page: 120
The 6th line from the bottom of the page reads, "class supports things such as map, include?, and find_all?". The name of the third method should be "...more...
  • Reported in: P10.0 (09-Aug-07)
#29394
Paper page: 120

The code near the top of the page is missing the line:
attr_reader :duration
--twscannell@hotmail.com

  • Reported in: P10.0 (04-Feb-15)
#78147
PDF page: 121
"If the last argument to a method is preceded by an ampersand, Ruby assumes that it is a Proc object. It removes it from the parameter list, convert...more...
  • Reported in: P10.0 (17-Nov-10)
#45626
Paper page: 122

First code example:

@observer_list ||= []
=> @observer_list = []

(I think!)--Sam Dutton

  • Reported in: P10.0 (17-Nov-10)
#45627
Paper page: 122

paragraph 4:
'uses our Observer module'
=> 'uses our Observable module'--Sam Dutton

  • Reported in: P10.0 (06-Nov-11)
#47906
Paper page: 127
bash-3.2# cat retry.rb for i in 1..100 print "Now at #{i}. Restart? " retry if gets =~ /^y/i end bash-3.2# irb retry.rb ruby-1.9.2-p...more...
  • Reported in: P10.0 (19-Sep-07)
#29679
PDF page: 130
At the top of page the following code appears: count = 0 threads = [] 10.times do |i| threads[i] = Thread.new do sleep(rand(0.1)) ...more...
  • Reported in: P10.0 (19-Sep-07)
#29677
Paper page: 131
p. 129: Reading and Writing Files -- The are no descriptions or examples showing how to write to a file in this section. So I find the title of the s...more...
  • Reported in: P10.0 (22-Jul-07)
#29348
Paper page: 143
Table 11.1 purports to demonstrate a race condition this will occur when either thread runs before the previously active thread has a chance to "store...more...
  • Reported in: P10.0 (25-Feb-12)
#48801
PDF page: 145
In the "Collecting Hash Arguments" section, the book said that: > > You can place key => value pairs in an argument list, as long as they follow ...more...
  • Reported in: P10.0 (01-Jan-09)
#36769
Paper page: 146
Chapter 11, “Threads and Processes”, contains a section “Condition Variables”. The book gives a code example that uses a condition variable. However, ...more...
  • Reported in: P10.0 (22-Jul-07)
#29349
Paper page: 146

It's not clear what the condition variable is in the code example.--bob

  • Reported in: P10.0 (20-Sep-07)
  • Fixed: 09-Jul-08, awaiting book release
#29680
Paper page: 149
On the bottom of p. 149 is this text and example: "For instance, we may want to kick off a long-running external sort. exec('sort testfile> output...more...
  • Reported in: P10.0 (02-Oct-07)
#29736
Paper page: 153
Unit Testing, chap 12: This omitted fact caused me hours of frustration and testing until I discovered how things work. Suppose you have a simple pr...more...
  • Reported in: P10.0 (01-Oct-07)
#29729
Paper page: 156
p. 156, example at top of page: The output shows the test failing, but there is no description of what was entered to get the test to fail. I tried ...more...
  • Reported in: P10.0 (02-Oct-07)
#29737
Paper page: 160
p. 160, "Where to put Tests", middle of the page: The text says, "A better solution is to run the tests from the directory containing the library bei...more...
  • Reported in: P10.0 (08-Dec-07)
#29962
Paper page: 163
The first time I tried to use the debugger was in 186 and I am seeing something different than in v2 of the book on page 163. Or perhaps I am doing so...more...
  • Reported in: P10.0 (02-Jan-09)
#36807
Paper page: 167
The book gives the following guideline: "Within a class definition, Ruby will parse setter= as an assignment to a local variable, not as a method ...more...
  • Reported in: P10.0 (02-Jan-09)
#36806
Paper page: 168
In the example illustrating "Watch out for precedence issues...", the complexity of the code (which contains several branches that are not executed) o...more...
  • Reported in: P9.0 (31-Oct-06)
#26439
Paper page: 173
Table 13.1 - second section (the one about disp): disp[lay] expr - Display value of nnn every time debugger gets control. should probably be: d...more...
  • Reported in: B8.0 (09-Nov-06)
#26524
Paper page: 191
The output of the sample invocation `ri "String.each"' is missing the braces in the syntax synopsis. This can look confusing to first-timers (that I w...more...
  • Reported in: P6.0 (16-Jan-08)
#30478
Paper page: 192
Third line of first paragraph in section "Interactive Configuration": ... to change your prompt back to DEFAULT, you ... should be ... to change yo...more...
  • Reported in: P10.0 (31-Jan-07)
#26905
PDF page: 193

"Both the following are" should be "Both of the following are". It might also be nice to close the sentence with a colon.--Rich Morin

  • Reported in: P10.0 (31-Jan-07)
#26923
PDF page: 196
"return +nil+, otherwise return" should be "return +nil+; otherwise, return" (twice) Similarly, "use it, otherwise accumulate" should be "use it; oth...more...
  • Reported in: P6.0 (16-Jan-08)
#30479
Paper page: 202

In the first line of the rdoc comment after the first paragraph, replace "though" with "through".--Felix Siegrist

  • Reported in: P10.0 (07-Oct-07)
#29754
Paper page: 216
p. 216, Installing Ruby Gems: the two commands at the top of the page read: % cd rubygems-0.7.0 % ruby install.rb However, according to the rub...more...
  • Reported in: P10.0 (07-Oct-07)
#29759
Paper page: 217
p. 217, The command at the top of the page is: % gem install -r rake But, when entered that command, first I got this: $ gem install -r rake ...more...
  • Reported in: P10.0 (21-Oct-07)
#29776
Paper page: 222
p. 222: The text says: "As of RubyGems 0.8.0, requiring rubygems.rb will install an overloaded version fo Ruby's require method. Having loaded the...more...
  • Reported in: P10.0 (04-May-07)
#28911
Paper page: 224
Since I was checking the gems directory, I found that all the doc/ directories in gems/ are all named with the singular form, not the plural form docs...more...
  • Reported in: P10.0 (04-Jan-09)
#36866
Paper page: 235
Two examples of a CGI script are given, where the only difference is that the second inserts a header. But this is obscured by the fact that this diff...more...
  • Reported in: P10.0 (31-Jan-07)
#26906
PDF page: 237

"reformated" should be "reformatted"--Rich Morin

  • Reported in: P6.0 (23-Jan-07)
#26874
Paper page: 251
The Google SOAP API seems no longer available for new users. Google says: <CITE> As of December 5, 2006, we are no longer issuing new API keys for t...more...
  • Reported in: P6.0 (16-Jan-08)
#30480
Paper page: 257

Last paragraph: "Accessing mycheck.value will return ..." should be "Accessing checked.value will return ...". --Felix Siegrist

  • Reported in: P10.0 (07-Sep-07)
#29635
PDF page: 292
Running the test ruby script for the my_test extension fails on OSX with: 1) Error: test_test(TestTest): NameError: uninitialized constant TestTe...more...
  • Reported in: P6.0 (16-Jan-08)
#30477
Paper page: 298
--with-name-lib=directory Reads: "Add directory/lib to the link command" Should read: "Add directory to the link command" Similar error appli...more...
  • Reported in: P1.0 (17-Dec-06)
#26761
Paper page: 309

The documented signature of rb_apply is incorrect - in fact it has no argc argument.--Jeremy Henty

  • Reported in: P10.0 (10-Dec-07)
#29975
PDF page: 324

Table 22.4 does not list the assignment operator ^=--Morton Goldberg

  • Reported in: P10.0 (06-Feb-15)
#78153
PDF page: 327
"Any parameter may be a prefixed with an asterisk. If a starred parameter supports the to_a method, that method is called, and the resulting array i...more...
  • Reported in: P10.0 (13-Dec-11)
#48265
PDF page: 327
The description of how the three-dot range works does not match what the code actually does. Further clarification is at least required. Expr2 in the ...more...
  • Reported in: P10.0 (08-Sep-07)
#29639
Paper page: 327

/a.*b.*a/ of course doesn't take exponential time but quadratic time.
--David Ongaro

  • Reported in: P6.0 (16-Jan-08)
#30481
Paper page: 328

3rd paragraph of section "Names", 1st and 2nd line: replace "a though z" and "A though Z" with "a through z" and "A through Z".--Felix Siegrist

  • Reported in: P10.0 (31-Jan-07)
#26907
PDF page: 336

"When used as an rvalue, element reference" should be "When used as an rvalue, an element reference"--Rich Morin

  • Reported in: P10.0 (08-Oct-07)
#29760
Paper page: 336
I'm currently using your "Programming Ruby" as a reference while learning Ruby and especially Rails. I'm highly enjoying the book. I did encounter ...more...
  • Reported in: P7.0 (21-Sep-06)
#25968
Paper page: 340
I believe there is a rule missing in the "Parallel Assignment" section. The last sentence on p. 91 states, "If an assignment has just one lvalue and m...more...
  • Reported in: P7.0 (21-Sep-06)
#25969
Paper page: 342
I think some clarification of "Ranges in Boolean Expressions" is in order :) The last sentence in the first paragraph doesn't agree with the last two ...more...
  • Reported in: P10.0 (31-Jan-07)
#26908
PDF page: 344

"LocalJumpError or ThreadError depending on" should be "LocalJumpError or ThreadError, depending on"--Rich Morin

  • Reported in: P10.0 (02-Oct-07)
#29738
Paper page: 352
p. 352, Aliases: At the top of the page, the first two lines say: "When a method is aliased, the new name refers to a copy of the original method'...more...
  • Reported in: P10.0 (04-Jan-09)
#36872
Paper page: 357
The code sample on page 357 could be improved in two ways: (1) The sample could demonstrate more aspects of the description at the top of the page. Fo...more...
  • Reported in: P10.0 (22-Jun-07)
#29256
Paper page: 358

last line: "is no longer valid"--Wing

  • Reported in: P10.0 (22-Jun-07)
#29258
Paper page: 360

Fourth line under the header "Raising Exceptions":
"raise thing [, string [stack trace]]" should be
"raise thing [, string [, stack trace]]"--Wing

  • Reported in: P10.0 (06-Oct-11)
#47709
PDF page: 361
Page 361 Your syntax diagram for parameters is missing a comma prefixing both *array and &block parameters. Invoking a Method [ receiver. ] name ...more...
  • Reported in: P6.0 (16-Jan-08)
#30482
Paper page: 373

Section "to_ary -> Array", first line: "... convert an object ..." --Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30483
Paper page: 373
Section "to_hash -> Hash", first line: "(The only known use is the second parameter to Hash#replace.)" should be "(The only known use is the parameter...more...
  • Reported in: P10.0 (04-Jan-09)
#36875
Paper page: 375
The final lines of the code sample may be poorly chosen as a means to illustrate the points made in the following paragraph. The end of the code sa...more...
  • Reported in: P10.0 (05-Jan-07)
#26809
Paper page: 376
In the ex0629.rb and ex0629.rb program listings this line should read: if Fixnum === other && (other + @value) <= MAX_ROMAN Otherwise, an miss-b...more...
  • Reported in: P10.0 (22-Jun-07)
#29259
Paper page: 381

In Figure 24.2, shouldn't be there an arrow linking klass of Class Object to the box of Class Object'?--Wing

  • Reported in: P10.0 (03-Feb-07)
#26931
PDF page: 392

In the table under "Runtime Callbacks", "Module#extend_object" should be "Module#extended".--Rich Morin

  • Reported in: P10.0 (20-Nov-07)
#29911
Paper page: 393
Regarding: "At the top-level, we're executing code in the context of some predefined object. When we define methods, we're actually creating ...more...
  • Reported in: P10.0 (08-Aug-07)
#29392
PDF page: 395

The page link in "See Kernel.require on page 507 for an example." actually leads to page 495 -- the first page for Kernel.--Steven Lumos

  • Reported in: B8.0 (09-Nov-06)
#26525
Paper page: 398

Under the $SAFE table, second sentence should read: "...or if it _is_ run under mod_ruby...", the "is" is missing.--Joachim Kuebart

  • Reported in: P10.0 (08-Jan-09)
#36947
Paper page: 454
In the description of the "all?" method, there should be a comma after "that is" in the parenthetical expression "(that is all? will return true...)"....more...
  • Reported in: P10.0 (05-Aug-07)
#29386
Paper page: 456
the description of Enumerable#inject. the text: "The first form let's you supply an initial value for memo. The second form uses the first element of ...more...
  • Reported in: P10.0 (23-Sep-08)
#34613
Paper page: 463
Under Exception#success? : "Returns true is the exit status if nil or zero." should read "Returns true if the exit status is nil or zero."--Celso...more...
  • Reported in: P6.0 (16-Jan-08)
#30484
Paper page: 468

fnmatch, second line: "Because fnmatch in implemented..." should be "Because fnmatch is implemented...".--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30485
Paper page: 485

divmod: remove one "on".--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30486
Paper page: 487

Class constants, in the comment of MAX_EXP and MIN_EXP: replace "FLT_RADIX" with "RADIX".--Felix Siegrist

  • Reported in: P10.0 (23-Sep-07)
#29692
PDF page: 495
In the library reference, in the Kernel module section, it says that Kernel module instance methods are listed in the Object class page, and instead i...more...
  • Reported in: P6.0 (16-Jan-08)
#30487
Paper page: 499

to_hash: "See page 373." (not 372)--Felix Siegrist

  • Reported in: P7.0 (11-Nov-06)
#26538
Paper page: 499
Both to_a and to_s show the following statement: h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300 } I believe one of the "c" => 300 key valu...more...
  • Reported in: P10.0 (20-Nov-07)
#29913
Paper page: 516
"The Kernel module is included by class Object, so its methods are available in every Ruby object." Here, "methods" should read "instance methods"....more...
  • Reported in: P10.0 (19-Oct-06)
#26313
PDF page: 521
Paper page: 542
The Math.sqrt function does not raise an "ArgError" (or an ArgumentError, if that's what you meant) if 'numeric' is less than 0. On both Linux and Wi...more...
  • Reported in: P6.0 (16-Jan-08)
#30488
Paper page: 546

Instance methods, "<, <=, >, >=", 3rd line: "... all operators return false." should be "... all operators return nil."--Felix Siegrist

  • Reported in: P10.0 (10-Jun-07)
#29207
PDF page: 547
Under 'clone', I think it would be helpful to mention that cloned objects retain singleton methods while duped objects do not. For example, class S...more...
  • Reported in: P6.0 (16-Jan-08)
#30490
Paper page: 551

Module#module_eval: the first sample call is "mod.class_eval(...)" instead of "mod.module_eval(...)".--Felix Siegrist

  • Reported in: P10.0 (03-Jan-07)
#26803
Paper page: 608
Perhaps it's just a one-time printing error, but at the top of the page, the small "1.8" sidenote is printed right over the word "Match", instead of i...more...
  • Reported in: P10.0 (17-Aug-07)
#29441
Paper page: 609
You state in the documentation for the []= method 'the Regexp and String forms will silently ignore the assignment [if the value is out of range].' Bu...more...
  • Reported in: P10.0 (02-Nov-07)
#29820
Paper page: 613
gsub() documentation on p.613: Above the description is the syntax: str.gsub(pattern, replacement) --string str.gsub( pattern ){|match| block} -...more...
  • Reported in: P10.0 (16-Jul-07)
#29325
Paper page: 619

The documentation for str.squeeze shows it returns

-> squeezed_tring

I assume this should be

-> squeezed_string--Daniel Machera

  • Reported in: P6.0 (16-Jan-08)
#30491
Paper page: 622

String#to_sym: the sample call is “<i>str</i>.to_s” instead of “<i>str</i>.to_sym”.--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30492
Paper page: 640
ThreadGroup, first paragraph, second line: "... will remove it from the its current group." should be "... will remove it from its current group."--Fe...more...
  • Reported in: P10.0 (08-May-07)
#28957
Paper page: 671

$ARGV should be ARGV.--Wing

  • Reported in: P10.0 (30-Jun-07)
#29287
Paper page: 673
The second paragraph says: "ERB breaks its input text into checks of regular text and program fragments." Perhaps "chunks" makes more sense then "che...more...
  • Reported in: P10.0 (16-Jan-08)
#30502
Paper page: 675
Near the bottom of the page: users.join(", ") should be users=users.join(", ") groups.join(", ") should be groups=groups.join(", ") My book's cop...more...
  • Reported in: P6.0 (16-Jan-08)
#30493
Paper page: 689

Library jcode, second paragraph, second line: "\343\210\202" should be "\342\210\202".--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30494
Paper page: 695

Library Monitor, second paragraph, second line: "and as a extension" -> "and as an extension".--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30495
Paper page: 712

--no-switch: "Defines a option..." -> "Defines an option...".--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30496
Paper page: 713
Library ParseDate, second line: if the time zone is included in the returned array, it's not just "an array of Fixnum values", but "an array of Fixnum...more...
  • Reported in: P7.0 (24-Oct-07)
#29789
Paper page: 718

In the 3rd sentence, "wrapper than profiles" should be "wrapper that profiles".--Brian Adkins

  • Reported in: P6.0 (16-Jan-08)
#30497
Paper page: 725

Library REXML, in the demo.xml: "Bignums store arbitraty-sized integers." should be "Bignums store arbitrary-sized integers."--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30498
Paper page: 726
18th line of the sample code: "# and write it out with a XML declaration at the front" should be "# and write it out with an XML declaration at the fr...more...
  • Reported in: P10.0 (20-Jan-07)
#26867
PDF page: 732
The first example of a weakref doesn't cause an exception. The text suggests that this is being demonstrated, but even the "produces" output shown has...more...
  • Reported in: P10.0 (05-Dec-07)
#29947
PDF page: 735

In the library reference for WIN32OLE, the first example (Open Internet Explorer...) omits the necessary "require 'win32ole'" line.--Rick Ford

  • Reported in: P1.0 (13-Aug-07)
#29402
Paper page: 759

The Zlib module does not support zip-format compressed files. To read those one has to use the rubyzip gem.--Nascif Abousalh-Neto

  • Reported in: P10.0 (29-Nov-06)
#26674
PDF page: 762
The bookmarks section of the PDF no longer contains a link to the Index. What happened to it? Can you put it back? The last thing I see is "Part V,...more...
  • Reported in: P6.0 (16-Jan-08)
#30499
Paper page: 768

Socket#pack_sockaddr_un: there's a typo in the sample call (Socket.pack_sockaddr_in instead of Socket.pack_sockaddr_un).--Felix Siegrist

  • Reported in: P6.0 (16-Jan-08)
#30500
Paper page: 769

Socket#unpack_sockaddr_in: wrong sample call (Socket.pack_sockaddr_in instead of Socket.unpack_sockaddr_in).
--Felix Siegrist

  • Reported in: P10.0 (16-Jan-08)
#30501
Paper page: 769

Socket#unpack_sockaddr_un: wrong sample call (Socket.pack_sockaddr_in instead of Socket.unpack_sockaddr_un).
--Felix Siegrist

  • Reported in: P2.0 (21-Aug-07)
#29557
Paper page: 769
The code listing for unpack_sockaddr_un on page 769 in the Second Edition is incorrect. It is a copy of the unpack_sockadd_in code listing. The explan...more...
  • Reported in: P7.0 (29-Nov-06)
#26684
Paper page: 790
It would be nice if there was an index entry for ? that referenced pp. 319-320 where using ? to obtain the integer value of an ASCII character is desc...more...
  • Reported in: P10.0 (08-Jul-08)
#32686
PDF page: 863
This may have been mentioned before, but the TOC no longer contains a link to the index in the PDF version. It would be great if it could have a link...more...

Stuff To Be Considered in the Next Edition

  • Reported in: B8.0 (12-Apr-06)
#24460
PDF page: v-xvi,790-831

Please add bookmarks for the Tables of Contents, Tables, and Figures, the Index, and the reference tables at the back.--Steven Lumos

  • Reported in: B8.0 (29-Jun-06)
#25365
Paper page: 105
Newer versions of ruby (1.8.4) seem to have a problem with the break in the 'retry' example (the example still works though): def do_until(cond) ...more...
  • Reported in: P9.0 (30-Aug-06)
#25815
PDF page: 154
Suggestion for next edition Please consider changing Fig. 12.2 into something that can be searched in Apple's Preview. As it is, I get no hits if I...more...
  • Reported in: P7.0 (02-Jan-06)
#23916
PDF page: 174
Not sure where this piece of info would fit best, so I put in the page number for the IRB chapter. Windows users with locales (or specifically keyb...more...
  • Reported in: P9.0 (22-Aug-06)
#25773
PDF page: 458
It would be helpful if some of the places that describe a return value which is a numeric 'gid' or 'uid' value would also mention that the "Etc" libra...more...
  • Reported in: P2.0 (24-May-06)
#25022
Paper page: 529
Description of the sleep method is incorrect for Ruby 1.8.4. Calling sleep with an argument of 'zero' as documented causes sleep to sleep for 0 second...more...