summaryrefslogtreecommitdiff
path: root/lib/ftools.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-02 04:49:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-02 04:49:46 +0000
commit6125313d69c158b423d1f4aff2e206cfd43a036a (patch)
treea1a78a9425305557dcff6569806876989c9098c3 /lib/ftools.rb
parentf5a7f85917abed4d64ad908a4837e0db0499c951 (diff)
* array.c (push_values_at): Array#values_at should work with
ranges too. * range.c (rb_range_beg_len): length calculation was wrong. * eval.c (rb_call): should set T_ICLASS in the frame->last_class. [ruby-core:01110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ftools.rb')
-rw-r--r--lib/ftools.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ftools.rb b/lib/ftools.rb
index 6e1c886e56..6e058a824c 100644
--- a/lib/ftools.rb
+++ b/lib/ftools.rb
@@ -39,7 +39,7 @@ class << File
end
def copy from, to, verbose = false
- $stderr.print from, " -> ", catname(from, to), "\n" if verbose
+ $deferr.print from, " -> ", catname(from, to), "\n" if verbose
syscopy from, to
end
@@ -49,7 +49,7 @@ class << File
def move from, to, verbose = false
to = catname(from, to)
- $stderr.print from, " -> ", to, "\n" if verbose
+ $deferr.print from, " -> ", to, "\n" if verbose
if RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/ and FileTest.file? to
unlink to
@@ -79,7 +79,7 @@ class << File
# false: not identical
def compare from, to, verbose = false
- $stderr.print from, " <=> ", to, "\n" if verbose
+ $deferr.print from, " <=> ", to, "\n" if verbose
return false if stat(from).size != stat(to).size
@@ -116,11 +116,11 @@ class << File
def safe_unlink(*files)
verbose = if files[-1].is_a? String then false else files.pop end
begin
- $stderr.print files.join(" "), "\n" if verbose
+ $deferr.print files.join(" "), "\n" if verbose
chmod 0777, *files
unlink(*files)
rescue
-# STDERR.print "warning: Couldn't unlink #{files.join ' '}\n"
+# $deferr.print "warning: Couldn't unlink #{files.join ' '}\n"
end
end
@@ -134,7 +134,7 @@ class << File
next if FileTest.directory? dir
parent = dirname(dir)
makedirs parent unless FileTest.directory? parent
- $stderr.print "mkdir ", dir, "\n" if verbose
+ $deferr.print "mkdir ", dir, "\n" if verbose
if basename(dir) != ""
Dir.mkdir dir, mode
end
@@ -148,7 +148,7 @@ class << File
vsave, $VERBOSE = $VERBOSE, false
def chmod(mode, *files)
verbose = if files[-1].is_a? String then false else files.pop end
- $stderr.printf "chmod %04o %s\n", mode, files.join(" ") if verbose
+ $deferr.printf "chmod %04o %s\n", mode, files.join(" ") if verbose
o_chmod mode, *files
end
$VERBOSE = vsave