From: Brian Candler Date: 2010-09-26T15:45:13+09:00 Subject: Re: Ruby error Ruwan Budha wrote: > Please help me to figure why ruby is throwing following error..... I know nothing about Gruff, but I do notice this: > x = Hash.new(a.size/inc) That probably doesn't do what you think. It says "create a Hash which returns 5 for any non-existent element" (try puts x[1000] for example) Hashes don't have sizes. If you really want a Hash then it should be x = Hash.new or just x = {} -- Posted via http://www.ruby-forum.com/.