Robert, clever!!! :-)

On Mon, Nov 25, 2013 at 7:07 AM, Robert Klemme
<shortcutter / googlemail.com> wrote:
> On Sun, Nov 24, 2013 at 8:27 PM, Peter Hickman
> <peterhickman386 / googlemail.com> wrote:
>
>> The creation of the array is outside the loop and do things in a more Ruby
>> way
>
> You could even do
>
> puts "How many cities would you like to specify?"
> n = Integer(gets)
>
> cities = Array.new n do
>     puts "City: "
>     gets.chomp
> end
>
> :-)
>
> Kind regards
>
> robert
>
> --
> remember.guy do |as, often| as.you_can - without end
> http://blog.rubybestpractices.com/