diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2025-01-14 17:58:17 -0800 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-01-14 17:58:17 -0800 |
| commit | 0d6459249d13e247cd0eae28f59ef51b862bce80 (patch) | |
| tree | 2c189d7d7ba71747ec348460c5897e7bf8518e15 /test/ruby | |
| parent | 3a986b47cba80bdc081638d5f759a26c1beb8fad (diff) | |
merge revision(s) 19c39e4cfaa467e69b9848c9c5496d7f50d39c7f: [Backport #20984]
[Bug #20984] ENV.inspect should be encoding aware
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_env.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb index cdadeac148..466d8d9d12 100644 --- a/test/ruby/test_env.rb +++ b/test/ruby/test_env.rb @@ -353,6 +353,13 @@ class TestEnv < Test::Unit::TestCase end end + def test_inspect_encoding + ENV.clear + key = "VAR\u{e5 e1 e2 e4 e3 101 3042}" + ENV[key] = "foo" + assert_equal(%{{"VAR\u{e5 e1 e2 e4 e3 101 3042}"=>"foo"}}, ENV.inspect) + end + def test_to_a ENV.clear ENV["foo"] = "bar" |
