summaryrefslogtreecommitdiff
path: root/lib/date.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-08 00:38:03 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-08 00:38:03 +0000
commit86ca9a693025411b874289a9de7509629bcb0674 (patch)
tree04562cacae73232ed4d0af6a376a7abc9535693e /lib/date.rb
parent89e1e1e78400a4bd8c9f701a197e6f30d2bee74e (diff)
* lib/date/format.rb (str[fp]time): now check specifications more
strictly. * and some trivial changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
-rw-r--r--lib/date.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/date.rb b/lib/date.rb
index 5ef4f871b1..1d949e59d1 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -1,12 +1,12 @@
#
# date.rb - date and time library
#
-# Author: Tadayoshi Funaba 1998-2006
+# Author: Tadayoshi Funaba 1998-2007
#
# Documentation: William Webber <william@williamwebber.com>
#
#--
-# $Id: date.rb,v 2.30 2006-12-30 21:43:41+09 tadf Exp $
+# $Id: date.rb,v 2.31 2007-09-08 08:30:25+09 tadf Exp $
#++
#
# == Overview
@@ -1400,6 +1400,11 @@ class Date
# we reach +limit+ (inclusive), yielding the resultant
# date at each step.
def step(limit, step=1) # :yield: date
+=begin
+ if step.zero?
+ raise ArgumentError, "step can't be 0"
+ end
+=end
unless block_given?
return to_enum(:step, limit, step)
end