diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/date.rb | 11 | ||||
-rw-r--r-- | lib/date/delta.rb | 2 |
2 files changed, 8 insertions, 5 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 diff --git a/lib/date/delta.rb b/lib/date/delta.rb index 51c857e78a..e524cbc324 100644 --- a/lib/date/delta.rb +++ b/lib/date/delta.rb @@ -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 |