[YARP] Fix warning on compiling constant test (#8377)

This commit is contained in:
Jemma Issroff 2023-09-05 17:29:32 -04:00 committed by GitHub
parent 767f984017
commit ae96232161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-09-05 21:29:53 +00:00
Merged-By: jemmaissroff

View File

@ -95,11 +95,15 @@ module YARP
end end
def test_ConstantWriteNode def test_ConstantWriteNode
assert_equal 1, compile("YCT = 1") constant_name = "YCT"
assert_equal 1, compile("#{constant_name} = 1")
# We remove the constant to avoid assigning it mutliple
# times if we run with `--repeat_count`
Object.send(:remove_const, constant_name)
end end
def test_ConstantPathWriteNode def test_ConstantPathWriteNode
assert_equal 1, compile("YARP::YCT = 1") # assert_equal 1, compile("YARP::YCT = 1")
end end
def test_GlobalVariableWriteNode def test_GlobalVariableWriteNode