From: hal9000@... Date: 2000-07-05T20:12:38+00:00 Subject: [ruby-talk:03849] RE: *arr expansion Thanks, Guy and Aleksi. Once again, the problem was between the chair and the keyboard... :) Hal In article , Aleksi Niemel wrote: > > def initialize(*elts) > > @elts = Array.new; > > elts.each {|x| @elts << x} > > @elts.uniq! > > end > > Guy already solved the case (I assume), but I've one comment to make. You > could probably replace > > elts.each {|x| @elts << x} > > with > > @elts.concat elts > > or (in this case) just > > @elts = elts.dup > > - Aleksi > > -- Hal Fulton Sent via Deja.com http://www.deja.com/ Before you buy.