This is your code, commented and adapted to behave like the wikipedia description.
def check_card(str) #creditcardnumber as argument
c_num = []
sum = 0
s_numbers = str.split("") #no reversing. str.split("").map(&:to_i) would save a lot of to_i's later on...
checksum = s_numbers.pop.to_i #chop off last digit, store as checksum
s_numbers.each_slice(2) do |x|
c_num << (x.last.to_s.to_i*2)
c_num << (x.first.to_s.to_i)
end
c_num.each do |num|
if num.to_i > 9
sum+= (num.to_i % 10)+1
else
sum += num.to_i
end
end
(sum * 9) % 10 == checksum
end
p check_card("79927398713") #=> true