summaryrefslogtreecommitdiff
path: root/lib/date.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-03 05:17:39 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-03-03 05:17:39 +0000
commit6a6d0ad22009c437217eb6aeb4c3750f7a3aaa6d (patch)
tree4ab0fd67ef12ea789ccb12df06654057f5ee6f87 /lib/date.rb
parent0cd0eab641a16d6e59f424ab3f5fad3550fa54b5 (diff)
* 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
Diffstat (limited to 'lib/date.rb')
-rw-r--r--lib/date.rb4
1 files changed, 2 insertions, 2 deletions
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)