avapoet/motp — pull request #1 by johannwilfling (2012-02-10 11:24:41+00:00)
Title: Refactored range iterator to work with Ruby 1.9

Ruby 1.9.X doesn't support iterating a Time range,
because the Time object doesn't implement the
#succ method.

Running the tests:
test_2min_ago(MOTP_Test):
TypeError: can't iterate from Time
/path/motp/lib/motp.rb:12:in `each'
/path/motp/lib/motp.rb:12:in `any?'
/path/lib/motp.rb:12:in `check'
motp_test.rb:26:in `test_2min_ago'

Removed the time range and converted it to an
unconventional while-loop to support Ruby 1.8.X
and 1.9.