diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-08 00:39:47 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-08 00:39:47 +0000 |
commit | edaea1cd136ef1a8e5e405f9be841ba53fb6efd6 (patch) | |
tree | da8caf1fc897afed226ee75646906949ddbd2b31 /lib/date.rb | |
parent | fe418c03ed775b1fd4592312128bb81ddbb465a5 (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/branches/ruby_1_8@13409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
-rw-r--r-- | lib/date.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/date.rb b/lib/date.rb index 6da4d6aa8e..2df3d2bc9d 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 @@ -1301,6 +1301,11 @@ class Date # date at each step. def step(limit, step=1) # :yield: date =begin + if step.zero? + raise ArgumentError, "step can't be 0" + end +=end +=begin unless block_given? return to_enum(:step, limit, step) end |