small medium large xlarge

The latest version of the book is P1.0, released 4 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.

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 (26-Aug-17)
#81991
PDF page: 4

The result of
inner_lambda.call
should be
"I will not drive the principal's car"

  • Reported in: P1.0 (09-Aug-17)
#81937
PDF page: 6

In the line 5 code example of lambda_counter.rb, I think it should be decr = lambda { x -= 1 } instead of decr = lambda { x += 1 }.--xinke li

Benjamin Tan says: Good catch! You're absolutely right.
  • Reported in: P1.0 (26-Aug-17)
#81992
PDF page: 9

last para: "So yes, a lambda can most definitely be passed into a lambda." should be "So yes, a lambda can most definitely be passed into a method."

  • Reported in: P1.0 (26-Aug-17)
#81993
PDF page: 10
para 3: the point of your section "First-Class Values" is lost here when you suddenly refer to them as "first-class functions". Do you mean they are v...more...
  • Reported in: P1.0 (06-Dec-17)
#82349
Paper page: 22
one of the last example in the page explain how to pass a variable to a block without being able to modify it inside the block: x = "outside x" 1....more...
  • Reported in: P1.0 (16-Aug-17)
#81956
PDF page: 30
I don't think your implementation of File#open will work as expected if the caller doesn't pass in a block. The "ensure" clause gets executed regardl...more...
  • Reported in: P1.0 (01-Oct-17)
#82116
Paper page: 36
In the code example "blocks/object_init_revised", outputing "client.consumer_key" and "client.consumer_token" returns "nil", unlike what the example ...more...
says: The example should be instead: client = Twitter::REST::Client.new({consumer_key: "YOUR_CONSUMER_KEY"}) do self.consumer_secret = "YOUR_CONSUMER_SECRET" self.access_token_secret = "YOUR_ACCESS_SECRET" self.access_token = "YOUR_ACCESS_TOKEN" end
  • Reported in: P1.0 (08-Dec-17)
#82359
PDF page: 48

first para: When Ruby sees an & and an object—any object—it will try to turn it into a block.

s/block/proc/ ?--Paul Mylchreest

  • Reported in: P1.0 (10-Aug-17)
#81938
PDF page: 51

See amp; where should be & in symbol to prod example--Tim Chambers

  • Reported in: P1.0 (10-Aug-17)
#81939
PDF page: 59

Exercise 2 should say to instantiate classes. The ‘to’ is missing--Tim Chambers

  • Reported in: P1.0 (10-Aug-17)
#81940
PDF page: 59

Extra periods in exercise 2 at end of first sentence--Tim Chambers

  • Reported in: P1.0 (04-Dec-17)
#82344
Paper page: 72
In the solution of the 5th exercise of Chapter 1, you wrote : reducer.call([], lambda { |acc, x| acc << x * 2}, [1,2,3,4,5]) but the second para...more...