Update post-comment-flood: This version works well everywhere. (In Rails, in Ruby 1, and in Ruby 2.) The earlier irb example also worked fine but the interactive example wasn't always reproduced correctly in some experiments. This one is easier to cut-and-paste.
irb(main):019:0> (Time.now .. (Time.now+1)) === Time.now
TypeError: can't iterate from Time
from (irb):19:in `each'
from (irb):19:in `include?'
from (irb):19:in `include?'
from (irb):19:in `==='
from (irb):19
from /opt/ruby192/bin/irb:12:in `<main>'