From: Shashank Date Date: 2004-11-11T09:28:29+09:00 Subject: Re: array.each restart when array is changed Kevin B�rgens wrote: > Second question: > why is this not allowed Because 'a' does not automagically cast to Fixnum. You have to do 'a'[0] to do that and .chr to get back the character. > #show me the first n letters of the alphabet > ('a'...'a'+gets.to_i).each{|e| puts e } Try this: ('a'[0]...'a'[0]+gets.to_i).each{|e| puts e.chr} > How to do it the right way? > > Thanks in advance, > Kevin