John Rubinubi <rubinubi / cyberspace.org> writes:

> I think some of the confusion about this comes from the last sentence on
> p24 which says "The corresponding instance variables, @name, @artist, and
> @duration, will be created automatically." I know I was also confused by
> this section and thought I didn't have to initialize the variables as
> shown on p19.

Ruby has no way of knowing what the association is between instance
variables and constructor parameters, so you still need to do that
work yourself--normally in the initialize method. However, I can see
where the confusion arises: we all tend to use the same name for
initialize's parameters as the corresponding instance variables.

I'll see if I can squeeze some extra explanation at the top of page
25.


Dave