This seems like such an obvious idea that I'm having trouble believing

I'm the first to think of it. Why not take ranges containing

Float::INFINITY and translate them to the appropriate greater than or

less than comparisons? Example:

class Person

scope :voters, -> { where(born_on: (-Float::INFINITY..18.years.ago)) }

end

This would generate something along the lines of "WHERE people.born_on

<= '1995-02-19'".

A proof of concept implementation was easy to knock out:

https://github.com/tpope/rails/commit/b98545a930546854ddf401edfaad4a3a4860aeff

This seems like a intuitive, unobtrusive way to make some comparison

operators available without dropping down to SQL. Tell me why I'm

wrong.