Remove dependency on Tempfile::Remover in leakchecker.rb
This commit is contained in:
parent
a68331e703
commit
2f67610f6b
@ -132,14 +132,14 @@ class LeakChecker
|
|||||||
attr_accessor :count
|
attr_accessor :count
|
||||||
end
|
end
|
||||||
|
|
||||||
def new(data)
|
def new(...)
|
||||||
LeakChecker::TempfileCounter.count += 1
|
LeakChecker::TempfileCounter.count += 1
|
||||||
super(data)
|
super
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
LeakChecker.const_set(:TempfileCounter, m)
|
LeakChecker.const_set(:TempfileCounter, m)
|
||||||
|
|
||||||
class << Tempfile::Remover
|
class << Tempfile
|
||||||
prepend LeakChecker::TempfileCounter
|
prepend LeakChecker::TempfileCounter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -136,14 +136,14 @@ class LeakChecker
|
|||||||
attr_accessor :count
|
attr_accessor :count
|
||||||
end
|
end
|
||||||
|
|
||||||
def new(data)
|
def new(...)
|
||||||
LeakChecker::TempfileCounter.count += 1
|
LeakChecker::TempfileCounter.count += 1
|
||||||
super(data)
|
super
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
LeakChecker.const_set(:TempfileCounter, m)
|
LeakChecker.const_set(:TempfileCounter, m)
|
||||||
|
|
||||||
class << Tempfile::Remover
|
class << Tempfile
|
||||||
prepend LeakChecker::TempfileCounter
|
prepend LeakChecker::TempfileCounter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user