[Bug #20992] Test for local variable name encodings

This commit is contained in:
Nobuyoshi Nakada 2024-12-30 17:04:09 +09:00
parent 3650f2460f
commit 5fec930832
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-12-30 09:59:57 +00:00
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,3 @@
if RUBY_DESCRIPTION.include?("+PRISM")
exclude(:test_local_variables_encoding, "[Bug #20992]")
end

View File

@ -425,6 +425,13 @@ class TestVariable < Test::Unit::TestCase
end
end
def test_local_variables_encoding
α = 1
b = binding
b.eval("".encode("us-ascii"))
assert_equal(%i[α b], b.local_variables)
end
private
def with_kwargs_11(v1:, v2:, v3:, v4:, v5:, v6:, v7:, v8:, v9:, v10:, v11:)
local_variables