Untested, but maybe something like this:

```ruby
age_ranges = ages.reverse.each_cons(2)
checks.inject({}) do |memo, check|
  check_age = start_time.to_i - check[1]
  check_age = 0 unless check_age > 0
  if check_age >= ages.last
    memo[ages.last] = check
  else
    age_range = age_ranges.detect {|a, b| check_age < a && check_age >= b }
    memo[age_range.last] = check unless age_range.nil?
  end
  memo
end
```

I reversed age range as a possible optimisation, but it may depend on the ranges passed and the ages of the checks -- could be made optional, or detected based on sampling the data?