mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
[YARP] Fix warning on compiling constant test (#8377)
This commit is contained in:
parent
767f984017
commit
ae96232161
Notes:
git
2023-09-05 21:29:53 +00:00
Merged-By: jemmaissroff
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue