diff options
Diffstat (limited to 'test/ruby/test_env.rb')
-rw-r--r-- | test/ruby/test_env.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb index cdadeac148..4b5f18e7bb 100644 --- a/test/ruby/test_env.rb +++ b/test/ruby/test_env.rb @@ -612,8 +612,8 @@ class TestEnv < Test::Unit::TestCase <<-"end;" envvars_to_check = [ "foo\0bar", - "#{'\xa1\xa1'}".force_encoding(Encoding::UTF_16LE), - "foo".force_encoding(Encoding::ISO_2022_JP), + "#{'\xa1\xa1'}".dup.force_encoding(Encoding::UTF_16LE), + "foo".dup.force_encoding(Encoding::ISO_2022_JP), ] envvars_to_check.each do |#{var_name}| #{str_for_yielding_exception_class(code_str)} |