summaryrefslogtreecommitdiff
path: root/lib/date.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-12 15:51:31 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-02-12 15:51:31 +0000
commitce430673bef566cf11b58ed4c2b7887f0912717f (patch)
treef4ffa2655cb82bd0f4ca6b56c4b404ff0d5b0864 /lib/date.rb
parent2eb7b57164da81ae8738395960941bbb145500ff (diff)
* lib/date.rb (Date#===): [ruby-core:35127]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
-rw-r--r--lib/date.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/date.rb b/lib/date.rb
index 43814792f7..079a6059bb 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -1,7 +1,7 @@
#
# date.rb - date and time library
#
-# Author: Tadayoshi Funaba 1998-2010
+# Author: Tadayoshi Funaba 1998-2011
#
# Documentation: William Webber <william@williamwebber.com>
#
@@ -1103,7 +1103,7 @@ class Date
end
end;
end
- end
+ end # <<dummy
private :once
@@ -1399,8 +1399,11 @@ class Date
when Numeric; return jd == other
when Date; return jd == other.jd
else
- l, r = other.coerce(self)
- return l === r
+ begin
+ l, r = other.coerce(self)
+ return l === r
+ rescue NoMethodError
+ end
end
false
end