1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/bootstraptest/test_env.rb
nobu 7f0d337be7 fallback env encoding to ASCII-8BIT
* hash.c (env_enc_str_new): as no locale/filesystem encoding is
  available in miniruby on Windows, fallback the encoding to
  ASCII-8BIT so it is valid encoding when the conversion failed.
  [ruby-core:89177] [Bug #15164]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-26 17:24:00 +00:00

12 lines
253 B
Ruby

assert_equal "true", %q{
ENV["ENVTEST"] = "\u{e9 3042 d76c}"
env = ENV["ENVTEST"]
env.valid_encoding?
}
# different encoding is used for PATH
assert_equal "true", %q{
ENV["PATH"] = "\u{e9 3042 d76c}"
env = ENV["PATH"]
env.valid_encoding?
}