From: "baumanj@..." Date: 2006-04-03T20:38:55+09:00 Subject: Re: Ruby way to sum digits Just one more way, since I haven't seen a solution that takes advantage of the no-parameter inject call: 1234.to_s.split('').map {|c| c.to_i }.inject {|i,j| i+j } => 10