summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-23 07:20:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-23 07:20:39 +0000
commit2e8ce8899a3ff262f2c3eb44f98af69500c4cf11 (patch)
tree550b1f09d4888ee8793b7a550f877a6e5dcdeca7 /test
parent87c8901d6915ecdb6d2807d770c13aa41719e875 (diff)
time.c: unnecessary encoding
* time.c (time_zone_name): remove unnecessary encoding and conversion if it is 7bit-ascii only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_time.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index 4ed899baf6..bf78bbf8cb 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -520,6 +520,7 @@ class TestTime < Test::Unit::TestCase
def assert_zone_encoding(time)
zone = time.zone
assert_predicate(zone, :valid_encoding?)
+ return if zone.ascii_only?
enc = Encoding.default_internal || Encoding.find('locale')
assert_equal(enc, zone.encoding)
end