From: daz Date: 2003-09-28T17:51:31+09:00 Subject: Re: Thoughts on yield I wrote: > > def chord(c) > @notes << c.split.map {|ce| Note[ce] } # OK > end > > def notes(n=nil) > if n > @notes << n.split.map {|ne| Note[ne] } # Oops !! # ^^ @notes += n.split.map {|ne| Note[ne] } > else > @notes > end > end > > #==================== > Oops, I pushed the note array instead of joining. Don't want people to think I don't care ;-) #-> [d, e, f#, g, a, b, c#, d, [c, d, g]] daz