From: Evan Hanson Date: 2010-03-04T05:48:09+09:00 Subject: Re: Music Theory (#229) 2010/3/3 Jesús Gabriel y Galán : > On Wed, Mar 3, 2010 at 8:13 PM, Evan Hanson >>  def names >>    notes = [] >>    @notes.each { |n| notes.push n.name } >>    notes >>  end > > def names >  @notes.map {|n| n.name} > end > >>  def to_s >>    out = "" >>    names.each { |n| out += n + " " } >>    out.strip! >>  end > > def to_s >  names.join(" ") > end > > Jesus. > Ha, that's probably Ruby 101. Cool, thanks. @Brian Candler -- I see you took the modal approach. Pretty cool. I like this: (mode-1).times { a.push(a.shift) }