summaryrefslogtreecommitdiff
path: root/sample
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
commitdc9cd6a8c22ad04baa7498fd0cbc5d519ed73be0 (patch)
tree0ed1cbf5a8ad5f37de2ad85b553844855abda41c /sample
parent62f83f9f13164cb2bfca7e18977620f649365e43 (diff)
updated to the new version (based on date2 3.2.1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/cal.rb8
-rw-r--r--sample/goodfriday.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/sample/cal.rb b/sample/cal.rb
index 4e0d416..92f43e2 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
diff --git a/sample/goodfriday.rb b/sample/goodfriday.rb
index 1c48f55..07809cf 100644
--- a/sample/goodfriday.rb
+++ b/sample/goodfriday.rb
@@ -3,7 +3,7 @@
# goodfriday.rb: Written by Tadayoshi Funaba 1998, 2000
# $Id: goodfriday.rb,v 1.1.1.1 2000-07-16 10:25:30+09 tadf Exp $
-require 'date2'
+require 'date'
def easter(y)
g = (y % 19) + 1