2016-11-17 19:50 GMT+02:00 botp <botpena / gmail.com>:
> joining the fxnal fun : ),
>
> def convert2 data
>    data.map(&method(:convert2))
> rescue
>    begin
>       Integer data
>    rescue
>       data
>    end
> end
>
> best regards
> --botp

That's Kernel#Integer method is awesome! Could be reduced to

def convert(data)
  data.map(&method(:convert)) rescue(Integer(data) rescue data)
end

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>