The Well-Grounded Rubyist, Second Edition

Thank you for purchasing The Well-Grounded Rubyist, Second Edition. Please post any errors, other than those listed below, in the book's Author Online Forum. We'll compile a comprehensive list and publish it here for everyone's convenience. Thank you!

Last updated January 22, 2015

Page xxvi:

The paragraph that begins with "Part 2" should end with "and console I/O."

Page 11, Listing 1.1:

The result is:

should be

The result is

There must be a space character after is, which isn't apparent without the colon character.

Page 21, second paragraph:

require "./loadee.rb"

should be

require "./loadee"

Pages 24-25:

The text in parentheses should be lowercase. For example, (-CW) should be (-cw).

Page 50:

The code sample in the middle of the page has an unnecessary line. Remove the following line:

puts "Arguments:"

Page 50:

In the last code sample, remove the following line:


Page 51:

In the code sample def args_unleashed, remove the following line:

puts "Arguments:"

Page 55:

In the long code sample, delete everything after the following line:

def say_goodbye

Page 104:

path of object c

should be

path of object account

the report method it executes

should be

the calculate_interest method it executes

Page 133, Figure 5.2:

def M

should be

def m

Page 223:

before the << operator:

should be

before the delimiter:

Page 331:

The reference to section 11.5 should be 11.7.

Page 337:

In the NOTE, replace the sentence that starts with "Instead" with the following:

Instead of $0 for pattern matches, Ruby lets you dereference the MatchData object with square brackets. Using [0], you get the part of the string that matched. You'll see examples of using square brackets with MatchData objects in the next two sections.

Page 479, second paragraph:


should be


Page 485, code sample at top of page:

require_relative 'microtest'

should be

require_relative 'micro_test'