From: Zundra Daniel Date: 2008-04-04T06:26:32+09:00 Subject: Re: using a range as a key ------=_Part_4800_9436086.1207257986275 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline is this what you're trying to do range = 12345...12360 hash = {range=>"success"} hash[range] => "success" On Thu, Apr 3, 2008 at 5:06 PM, Michael Linfield wrote: > I'm trying to achieve the effect of having a range of integers as a hash > key, possible? > > In effect I've tried: > > range = 12345...12360 > > hash = { range => "success!" } > > hash[12349] > > => nil > > I've also tried: > > array = [] > range.each{|x| array << x} > > hash = { array => "success!" } > > hash[12349] > => nil > > Anyone have any advice to point me in a direction? > > Thanks! > > - Mac > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_4800_9436086.1207257986275--