pescador_bob (5) [Avatar] Offline
#1
listing 4.1 line 20 reads:

assert (0.0..1.0).contains(0.5)

unfortunately, this assertion fails now (even though it must have when you wrote the book).

a printout

(0.0..1.0).each { num ->
print num + ', '
}

prints:

0.0, 1.0,
pescador_bob (5) [Avatar] Offline
#2
Re: Code error in listing 4.1 (range declarations)
I saw this post on this, not in the errata as I supposed it should be:

http://www.manning-sandbox.com/click.jspa?searchID=-1&messageID=63952

but my question then is, how would listing 4.2 then work if the age were something like 36.5

Could you use the switch statement then with containsWithin somehow?