I just started learning Ruby and I ran into a problem today.
numResults = /\d+/.match(ie.div(:id, 'results_label').text)
puts "Results found: "+numResults.to_s
while(numResults > 0)
.
. some more code
.
I get this error in my output:
Exception: undefined method `>' for #<MatchData:0x424c6d4>
Which is really strange because I made a while loop in IRB and it worked fine. I can't get the code inside the loop to execute because the program sticks at the condition.
Anyone know what's wrong?