Remove dependency on Tempfile::Remover in leakchecker.rb

This commit is contained in:
Peter Zhu 2024-08-20 14:29:40 -04:00
parent a68331e703
commit 2f67610f6b
2 changed files with 6 additions and 6 deletions

View File

@ -132,14 +132,14 @@ class LeakChecker
attr_accessor :count
end
def new(data)
def new(...)
LeakChecker::TempfileCounter.count += 1
super(data)
super
end
}
LeakChecker.const_set(:TempfileCounter, m)
class << Tempfile::Remover
class << Tempfile
prepend LeakChecker::TempfileCounter
end
end

View File

@ -136,14 +136,14 @@ class LeakChecker
attr_accessor :count
end
def new(data)
def new(...)
LeakChecker::TempfileCounter.count += 1
super(data)
super
end
}
LeakChecker.const_set(:TempfileCounter, m)
class << Tempfile::Remover
class << Tempfile
prepend LeakChecker::TempfileCounter
end
end