aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-04 02:54:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-04 02:54:32 +0000
commit58bb9f79366bb16ca30c4c26c71e3499db745663 (patch)
tree2d300ddafe848ca7f9c4d7b967e699059c43059c /test
parent24cfbab1f06ca3e89b084c2b4c586d19d7c7fd9f (diff)
downloadruby-58bb9f79366bb16ca30c4c26c71e3499db745663.tar.gz
hash.c: set encoding
* hash.c (env_assoc): the encoding of the value should be the locale, as well as other methods, [], fetch, values, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_env.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index 17323ccf95..77e83863c5 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -319,6 +319,8 @@ class TestEnv < Test::Unit::TestCase
assert_equal("foo", v)
end
assert_invalid_env {|var| ENV.assoc(var)}
+ assert_predicate(v, :tainted?)
+ assert_equal(Encoding.find("locale"), v.encoding)
end
def test_has_value2