Skip to content

Commit

Permalink
[Bug #20992] Test for local variable name encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 30, 2024
1 parent 3650f24 commit 5fec930
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/.excludes/TestVariable.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if RUBY_DESCRIPTION.include?("+PRISM")
exclude(:test_local_variables_encoding, "[Bug #20992]")
end
7 changes: 7 additions & 0 deletions test/ruby/test_variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,13 @@ def test_many_instance_variables
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
Expand Down

0 comments on commit 5fec930

Please sign in to comment.