vendor/gems/rubyzip-0.9.1/lib/quiz1/t/solutions/Carlos/solitaire.rb
# returns an array with the code of the letters,
# padded with the code of X
returns an array with the code of the letters,
padded with the code of X
returns an array with the code of the letters padded with the code of X
def to_numbers
		res=upcase.unpack("C*").collect { |b|
			if b.between? ?A, ?Z
				b - ?A + 1
			else
				nil
			end
		}.compact
		res.fill 24, res.length, (5 - res.length % 5) % 5
	end
def to_numbers res = upcase . unpack ( "C*" ) . collect { | b | if b . between? ?A , ?Z b - ?A + 1 else nil end } . compact res . fill 24 , res . length , ( 5 - res . length % 5 ) % 5 end
returns an array with the code of the letters,
padded with the code of X
returns an array with the code of the letters padded with the code of X
# 24 == X