Time was wrongly accept non-numeric objects.

https://bugs.ruby-lang.org/issues/8173
Merge pull request #1 from akr/ruby

Time was wrongly accept non-numeric objects.