class Array def to_f # 0.upto(self.length-1) do |v| # self[v]=self[v].to_f # end self.collect!{|v| v.to_f} self end def to_i # 0.upto(self.length-1) do |v| # self[v]=self[v].to_i # end self.collect!{|v| v.to_i} self end end #class Array