I lifted the following two lines from your (great) book - Page 285
************
a = ["a","b","c","d"].
a.collect! {|x| x+"!"}
p a
*************
which has the output
>> undefined method `a' for ["a", "b", "c", "d"]:Array (NameError)
The output of
******************
a = ["a","b","c","d"].collect! {|x| x+"!"}
p a
******************
is the indented
>> ["a!", "b!", "c!", "d!"]
what is going on ? Also the new method is removed from Fixnum on the other
hand the code segment
************
p 34.id == 34.id
************
returns >> true  - in contrast to
************
p "x".id  == "x".id
***************
which returns >>false.  From this I would conclude that  ``34''  is
semantically a singleton ``34'' object - but the interpreter barks at the
following lines
*********
module Withbla
def bla
end
end
x = 34
x.extend(Withbla)
***********
with the complain >> `extend_object': can't define singleton (TypeError)  -
what is the semantic reasoning behind this?
Thanks,
   Christoph