summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-18 23:13:15 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-18 23:13:15 +0000
commitfd2f7ab576b71f4c40def22d30109e544553a93a (patch)
tree74cdbc9561639784e7dedf277804e585259216f3
parent03f8ef900a3640f077b96617baf4881300d25ae9 (diff)
use warn() instead of $stderr.puts().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/date.rb12
-rw-r--r--sample/cal.rb2
3 files changed, 11 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c241ec164..89ed569f4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
-Mon May 19 00:24:13 2003 Tadayoshi Funaba <tadf@dotrb.org>
+Mon May 19 08:08:51 2003 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/date.rb: use $deferr instead of $stderr.
+ * lib/date.rb: use warn() instead of $stderr.puts().
+
+ * sample/cal.rb: ditto.
Sat May 17 02:17:42 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
diff --git a/lib/date.rb b/lib/date.rb
index f9ba3ba1e6..6dac752654 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -532,9 +532,9 @@ class Date
module_eval <<-"end;"
def self.#{old}(*args, &block)
if $VERBOSE
- $deferr.puts("\#{caller.shift.sub(/:in .*/, '')}: " \
- "warning: \#{self}::#{old} is deprecated; " \
- "use \#{self}::#{new}")
+ warn("\#{caller.shift.sub(/:in .*/, '')}: " \
+ "warning: \#{self}::#{old} is deprecated; " \
+ "use \#{self}::#{new}")
end
#{new}(*args, &block)
end
@@ -549,9 +549,9 @@ class Date
module_eval <<-"end;"
def #{old}(*args, &block)
if $VERBOSE
- $deferr.puts("\#{caller.shift.sub(/:in .*/, '')}: " \
- "warning: \#{self.class}\##{old} is deprecated; " \
- "use \#{self.class}\##{new}")
+ warn("\#{caller.shift.sub(/:in .*/, '')}: " \
+ "warning: \#{self.class}\##{old} is deprecated; " \
+ "use \#{self.class}\##{new}")
end
#{new}(*args, &block)
end
diff --git a/sample/cal.rb b/sample/cal.rb
index e8452349dd..e17c5e2a3e 100644
--- a/sample/cal.rb
+++ b/sample/cal.rb
@@ -32,7 +32,7 @@ $tab =
$cc = 'gb'
def usage
- $stderr.puts 'usage: cal [-c iso3166] [-jmty] [[month] year]'
+ warn 'usage: cal [-c iso3166] [-jmty] [[month] year]'
exit 1
end