* lib/date.rb (Date#===): [ruby-core:35127]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2011-02-12 15:51:31 +00:00
parent 2eb7b57164
commit ce430673be
3 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,7 @@
Sun Feb 13 00:48:47 2011 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb (Date#===): [ruby-core:35127]
Sun Feb 13 00:29:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Feb 13 00:29:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/test/unit.rb (Test::Unit::Options#process_args): always * lib/test/unit.rb (Test::Unit::Options#process_args): always

View File

@ -1,7 +1,7 @@
# #
# date.rb - date and time library # date.rb - date and time library
# #
# Author: Tadayoshi Funaba 1998-2010 # Author: Tadayoshi Funaba 1998-2011
# #
# Documentation: William Webber <william@williamwebber.com> # Documentation: William Webber <william@williamwebber.com>
# #
@ -1103,7 +1103,7 @@ class Date
end end
end; end;
end end
end end # <<dummy
private :once private :once
@ -1399,8 +1399,11 @@ class Date
when Numeric; return jd == other when Numeric; return jd == other
when Date; return jd == other.jd when Date; return jd == other.jd
else else
l, r = other.coerce(self) begin
return l === r l, r = other.coerce(self)
return l === r
rescue NoMethodError
end
end end
false false
end end

View File

@ -231,7 +231,7 @@ class Date
@delta.real / (u * RUNITS['#{k}']) @delta.real / (u * RUNITS['#{k}'])
end end
end; end;
end end # <<dummy
alias_method :in_mins, :in_minutes alias_method :in_mins, :in_minutes
alias_method :in_secs, :in_seconds alias_method :in_secs, :in_seconds