summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-09 14:43:06 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-09 14:43:06 +0000
commit49d542f6d32381c44721fd4a89e423d489c8bec7 (patch)
treef4eed3b319e1f7fe2f0e425f966c376caa159ecd /bootstraptest
parente2283c62f56de6b77e59dce5c239aa8400926a4c (diff)
merge revision(s) 64860,64861: [Backport #15164]
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] * properties. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@64982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_env.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_env.rb b/bootstraptest/test_env.rb
new file mode 100644
index 0000000000..7d1b45b75e
--- /dev/null
+++ b/bootstraptest/test_env.rb
@@ -0,0 +1,12 @@
+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?
+}