Skip to content

Commit ce1834d

Browse files
author
tadf
committed
* 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
1 parent b75c2a9 commit ce1834d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Dec 30 22:44:50 2007 Tadayoshi Funaba <tadf@dotrb.org>
2+
3+
* lib/date.rb (_valid_time?): I'm not sure to recommend such an
4+
expression. but anyway it is acceptable now. [ruby-core:14580]
5+
16
Sun Dec 30 21:54:26 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
27

38
* parse.y (program, yycompile0): too early to drop lex_lastline in

lib/date.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Documentation: William Webber <william@williamwebber.com>
77
#
88
#--
9-
# $Id: date.rb,v 2.33 2007-12-22 14:41:34+09 tadf Exp $
9+
# $Id: date.rb,v 2.34 2007-12-30 21:45:27+09 tadf Exp $
1010
#++
1111
#
1212
# == Overview
@@ -676,9 +676,9 @@ def _valid_time? (h, min, s) # :nodoc:
676676
h += 24 if h < 0
677677
min += 60 if min < 0
678678
s += 60 if s < 0
679-
return unless ((0..23) === h &&
680-
(0..59) === min &&
681-
(0..59) === s) ||
679+
return unless ((0...24) === h &&
680+
(0...60) === min &&
681+
(0...60) === s) ||
682682
(24 == h &&
683683
0 == min &&
684684
0 == s)

0 commit comments

Comments
 (0)