From: Joel VanderWerf Date: 2010-08-12T07:08:07+09:00 Subject: Re: syntax error, unexpected '}', expecting kEND Louise Rains wrote: > q.inject(Array.new(4,0)){ |h,e| if e < 10000 then h[Math.log10(e).to_i] > +=1 } You need an "end" to go with the "if .. then .. " : q.inject(Array.new(4,0)){ |h,e| if e < 10000 then h[Math.log10(e).to_i] +=1; end }