use warn() instead of $stderr.puts().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
03f8ef900a
commit
fd2f7ab576
@ -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>
|
Sat May 17 02:17:42 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ class Date
|
|||||||
module_eval <<-"end;"
|
module_eval <<-"end;"
|
||||||
def self.#{old}(*args, &block)
|
def self.#{old}(*args, &block)
|
||||||
if $VERBOSE
|
if $VERBOSE
|
||||||
$deferr.puts("\#{caller.shift.sub(/:in .*/, '')}: " \
|
warn("\#{caller.shift.sub(/:in .*/, '')}: " \
|
||||||
"warning: \#{self}::#{old} is deprecated; " \
|
"warning: \#{self}::#{old} is deprecated; " \
|
||||||
"use \#{self}::#{new}")
|
"use \#{self}::#{new}")
|
||||||
end
|
end
|
||||||
@ -549,7 +549,7 @@ class Date
|
|||||||
module_eval <<-"end;"
|
module_eval <<-"end;"
|
||||||
def #{old}(*args, &block)
|
def #{old}(*args, &block)
|
||||||
if $VERBOSE
|
if $VERBOSE
|
||||||
$deferr.puts("\#{caller.shift.sub(/:in .*/, '')}: " \
|
warn("\#{caller.shift.sub(/:in .*/, '')}: " \
|
||||||
"warning: \#{self.class}\##{old} is deprecated; " \
|
"warning: \#{self.class}\##{old} is deprecated; " \
|
||||||
"use \#{self.class}\##{new}")
|
"use \#{self.class}\##{new}")
|
||||||
end
|
end
|
||||||
|
@ -32,7 +32,7 @@ $tab =
|
|||||||
$cc = 'gb'
|
$cc = 'gb'
|
||||||
|
|
||||||
def usage
|
def usage
|
||||||
$stderr.puts 'usage: cal [-c iso3166] [-jmty] [[month] year]'
|
warn 'usage: cal [-c iso3166] [-jmty] [[month] year]'
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user