summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-30 13:48:03 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-30 13:48:03 +0000
commitce1834d6587bcf71dc534fd351e9ffcbc69f264b (patch)
tree65ae4dd708242ec7b84241a5be2e10381271dd2f
parentb75c2a939d7c79c0e81e311e13beabc52c6402ca (diff)
downloadruby-ce1834d6587bcf71dc534fd351e9ffcbc69f264b.tar.gz
* lib/date.rb (_valid_time?): I'm not sure to recommend such an
expression. but anyway it is acceptable now. [ruby-core:14580] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/date.rb8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4415eeb842..5454d68999 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Dec 30 22:44:50 2007 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * lib/date.rb (_valid_time?): I'm not sure to recommend such an
+ expression. but anyway it is acceptable now. [ruby-core:14580]
+
Sun Dec 30 21:54:26 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (program, yycompile0): too early to drop lex_lastline in
diff --git a/lib/date.rb b/lib/date.rb
index d2359bf3ba..dec02967f2 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -6,7 +6,7 @@
# Documentation: William Webber <william@williamwebber.com>
#
#--
-# $Id: date.rb,v 2.33 2007-12-22 14:41:34+09 tadf Exp $
+# $Id: date.rb,v 2.34 2007-12-30 21:45:27+09 tadf Exp $
#++
#
# == Overview
@@ -676,9 +676,9 @@ class Date
h += 24 if h < 0
min += 60 if min < 0
s += 60 if s < 0
- return unless ((0..23) === h &&
- (0..59) === min &&
- (0..59) === s) ||
+ return unless ((0...24) === h &&
+ (0...60) === min &&
+ (0...60) === s) ||
(24 == h &&
0 == min &&
0 == s)