diff options
Diffstat (limited to 'lib/tempfile.rb')
-rw-r--r-- | lib/tempfile.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 5489ac044f..671ac7b83b 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -124,7 +124,7 @@ class Tempfile < DelegateClass(File) # If Tempfile.new cannot find a unique filename within a limited # number of tries, then it will raise an exception. def initialize(basename="", tmpdir=nil, mode: 0, **options) - warn "Tempfile.new doesn't call the given block." if block_given? + warn "Tempfile.new doesn't call the given block.", uplevel: 1 if block_given? @unlinked = false @mode = mode|File::RDWR|File::CREAT|File::EXCL @@ -250,7 +250,7 @@ class Tempfile < DelegateClass(File) def call(*args) return if @pid != Process.pid - warn "removing #{@tmpfile.path}..." if $DEBUG + $stderr.puts "removing #{@tmpfile.path}..." if $DEBUG @tmpfile.close begin @@ -258,7 +258,7 @@ class Tempfile < DelegateClass(File) rescue Errno::ENOENT end - warn "done" if $DEBUG + $stderr.puts "done" if $DEBUG end end |