Hi! * David A. Black: > > n5.each_index { |i| max += 5 * 10 ** i unless i.nil? } > > i will never be nil -- it will always be an integer. (Did you mean > "unless n5[i].nil?'?) You are right. Stupid mistake. Josef 'Jupp' SCHUGT -- E-Mail: .--- ..- .--. .--. .--.-. --. -- -..- .-.-.- -.. . http://oss.erdfunkstelle.de/ruby/ - German comp.lang.ruby FAQ http://rubyforge.org/users/jupp/ - Ruby projects at Rubyforge