On Wed, Dec 7, 2016 at 11:10 AM, Micky Scandal <mickyscandal / gmail.com> wrote:

>     factors = num.prime_division.map {|ary| ary.delete_at(0)}

that line is confusing (to me). just get the value, no need to delete something.
so,

factors = num.prime_division.map {|ary| ary[0] }

or

factors = num.prime_division.map &:first

best regards
--botp

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