From: Robert Klemme Date: 2012-02-17T18:07:23+09:00 Subject: Re: A better way? On Fri, Feb 17, 2012 at 9:54 AM, Ronnie Collinson wrote: > If the letters dont go higher then F, you could add 10 and convert to > a hex (string) > > (random_insert + 10).to_s(16) There's another approach: using the alphabet: irb(main):024:0> char_a = 'A'.bytes.first => 65 irb(main):025:0> (char_a + rand(26)).chr => "G" or random_insert = ... (char_a + random_insert).chr Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/