diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-09-05 17:29:32 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-05 17:29:32 -0400 |
| commit | ae9623216110277691cae4cb6d56ba76f170cbd7 (patch) | |
| tree | e11ebb72fa7aa885b1689d165706945c7cdafc8a /test | |
| parent | 767f984017ca264262d9ef04d1db78c6f361e65a (diff) | |
[YARP] Fix warning on compiling constant test (#8377)
Notes
Notes:
Merged-By: jemmaissroff
Diffstat (limited to 'test')
| -rw-r--r-- | test/yarp/compiler_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb index b601ea585d..d1cd7e3305 100644 --- a/test/yarp/compiler_test.rb +++ b/test/yarp/compiler_test.rb @@ -95,11 +95,15 @@ module YARP end 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 def test_ConstantPathWriteNode - assert_equal 1, compile("YARP::YCT = 1") + # assert_equal 1, compile("YARP::YCT = 1") end def test_GlobalVariableWriteNode |
