From 6a6d0ad22009c437217eb6aeb4c3750f7a3aaa6d Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 3 Mar 2003 05:17:39 +0000 Subject: * parse.y (arg): parse 'lhs = a rescue b' as 'lhs=(a rescue b)'. * io.c (rb_io_fread): should not clearerr() if there's no filled buffer (i.e. rb_io_fread() returning zero). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/date.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/date.rb') diff --git a/lib/date.rb b/lib/date.rb index 51cc95ee18..e04f0b01b0 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -365,7 +365,7 @@ class Date when Numeric; return @ajd <=> other when Date; return @ajd <=> other.ajd end - raise TypeError, 'expected numeric or date' + nil end def === (other) @@ -373,7 +373,7 @@ class Date when Numeric; return jd == other when Date; return jd == other.jd end - raise TypeError, 'expected numeric or date' + false end def >> (n) -- cgit v1.2.3