mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
2eb7b57164
commit
ce430673be
3 changed files with 12 additions and 5 deletions
|
@ -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>
|
||||
|
||||
* lib/test/unit.rb (Test::Unit::Options#process_args): always
|
||||
|
|
11
lib/date.rb
11
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
|
||||
|
|
|
@ -231,7 +231,7 @@ class Date
|
|||
@delta.real / (u * RUNITS['#{k}'])
|
||||
end
|
||||
end;
|
||||
end
|
||||
end # <<dummy
|
||||
|
||||
alias_method :in_mins, :in_minutes
|
||||
alias_method :in_secs, :in_seconds
|
||||
|
|
Loading…
Reference in a new issue