From: Justin Collins Date: 2006-06-27T08:50:39+09:00 Subject: Re: Quick quesiton abt an array of characters.. brez! !! wrote: > This seems like it'd be obvious but haven't had any luck with it.. > > Let's say I want to build an array of characters in order, i.e. > > characters = ['a','b','c','d',..] > > If they were numbers I could do this: > > r = [] > (0..9).each { |x| r << x} > > but how to do for characters? > > Thanks > > Same... irb(main):001:0> ('a'..'z').to_a => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] HTH -Justin