Use a local instead of an instance variable
This commit is contained in:
parent
5e62d7503e
commit
4851b1e7a8
@ -621,7 +621,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run_test
|
def run_test
|
||||||
@oldhome = ENV["HOME"]
|
old_home = ENV["HOME"]
|
||||||
self.build = Tab.for_formula(self)
|
self.build = Tab.for_formula(self)
|
||||||
mktemp do
|
mktemp do
|
||||||
@testpath = Pathname.pwd
|
@testpath = Pathname.pwd
|
||||||
@ -630,7 +630,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
@testpath = nil
|
@testpath = nil
|
||||||
ENV["HOME"] = @oldhome
|
ENV["HOME"] = old_home
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_defined?
|
def test_defined?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user