Skip to content

Commit

Permalink
[YARP] Fix warning on compiling constant test (#8377)
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmaissroff committed Sep 5, 2023
1 parent 767f984 commit ae96232
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/yarp/compiler_test.rb
Expand Up @@ -95,11 +95,15 @@ def test_ClassVariableOperatorWriteNode
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
Expand Down

0 comments on commit ae96232

Please sign in to comment.