summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-15 07:19:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-15 07:19:25 +0000
commit020fcc95fe948f65b03609d445a6cf1bc0c06dc5 (patch)
tree1fa20b692afb9923c84449d9757d8535f5165e5e /test/ruby
parentb2a128fa7cabcce182e7360db70b3e50bb39242d (diff)
string.c: fix coderange for non-endianness string
* string.c (rb_enc_str_coderange): dummy wchar, non-endianness encoding string cannot be ascii only. [ruby-core:66835] [Bug #10598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_m17n.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index bbaf31f52a..99450723cf 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -260,6 +260,14 @@ class TestM17N < Test::Unit::TestCase
end
end
+ def test_utf_without_bom_asciionly
+ bug10598 = '[ruby-core:66835] [Bug #10598]'
+ encs = [Encoding::UTF_16, Encoding::UTF_32].find_all {|enc|
+ "abcd".force_encoding(enc).ascii_only?
+ }
+ assert_empty(encs, bug10598)
+ end
+
def test_object_utf16_32_inspect
EnvUtil.suppress_warning do
begin