diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/.excludes/TestVariable.rb | 3 | ||||
-rw-r--r-- | test/ruby/test_variable.rb | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/.excludes/TestVariable.rb b/test/.excludes/TestVariable.rb new file mode 100644 index 0000000000..ecfbb0e3b8 --- /dev/null +++ b/test/.excludes/TestVariable.rb @@ -0,0 +1,3 @@ +if RUBY_DESCRIPTION.include?("+PRISM") + exclude(:test_local_variables_encoding, "[Bug #20992]") +end diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 86f2e4bb84..49fec2d40e 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -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 |