You really don't need to declare your type. The arr = Array.new
statement is unnecessary.
In fact, there's no way to declare types of variables in Ruby.
At any given time a variable is bound to a particular object, but
which object (with its 'type', whatever that means) can change by
reassignment to the variable.
Somehow, it seems that this notion of 'declaring' a variable type by
assigning a 'prototype' object before setting the variable to the
'real' value seems to have become a common misconception in several
threads here on ruby-talk. Not sure why.