From: Yukihiro Matsumoto Date: 2009-06-07T03:17:55+09:00 Subject: [ruby-core:23735] Re: [Bug #1583] Time + String no Longer Raises TypeError? Hi, In message "Re: [ruby-core:23733] Re: [Bug #1583] Time + String no Longer Raises TypeError?" on Sun, 7 Jun 2009 02:05:23 +0900, Nobuyoshi Nakada writes: |To get number from rhs, now calls to_r method on it. |I think distinct implicit coercion and explicit conversion for |Rational are needed, like as to_int and to_i for Integer. And add to_flo as well? I'd rather reject T_STRING, as 1.8. diff --git a/time.c b/time.c index 2775e57..e2131db 100644 --- a/time.c +++ b/time.c @@ -192,6 +192,7 @@ num_exact(VALUE v) break; } + case T_STRING: case T_NIL: goto typeerror;