summaryrefslogtreecommitdiffstats
path: root/sample/cal.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-18 12:41:51 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-18 12:41:51 +0000
commitc1ead61e75ec6cdf63276172370af3497bab5f71 (patch)
tree0ed1cbf5a8ad5f37de2ad85b553844855abda41c /sample/cal.rb
parent94bc76a60de5a05d039f169724ef7bf96e7e8028 (diff)
downloadruby-c1ead61e75ec6cdf63276172370af3497bab5f71.tar.gz
ruby-c1ead61e75ec6cdf63276172370af3497bab5f71.tar.xz
ruby-c1ead61e75ec6cdf63276172370af3497bab5f71.zip
updated to the new version (based on date2 3.2.1).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/cal.rb')
-rw-r--r--sample/cal.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/sample/cal.rb b/sample/cal.rb
index 4e0d416f0..92f43e2a7 100644
--- a/sample/cal.rb
+++ b/sample/cal.rb
@@ -1,9 +1,9 @@
#! /usr/bin/env ruby
-# cal.rb: Written by Tadayoshi Funaba 1998-2000
-# $Id: cal.rb,v 1.11 2000-07-16 10:28:50+09 tadf Exp $
+# cal.rb: Written by Tadayoshi Funaba 1998-2002
+# $Id: cal.rb,v 2.3 2002-05-14 07:43:39+09 tadf Exp $
-require 'date2'
+require 'date'
require 'getopts'
$tab =
@@ -84,7 +84,7 @@ end
usage unless getopts('jmty', "c:#{$cc}")
-y, m = ARGV.indexes(1, 0).compact.collect{|x| x.to_i}
+y, m = ARGV.select(1, 0).compact.collect{|x| x.to_i}
$OPT_y ||= (y and not m)
to = Date.today