summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_encoding.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index e0a27ef6b6..6a406ae237 100644
--- a/test/ruby/test_encoding.rb
+++ b/test/ruby/test_encoding.rb
@@ -50,6 +50,9 @@ class TestEncoding < Test::Unit::TestCase
exit Encoding.find("filesystem") == Encoding::EUC_JP
EOS
end
+
+ bug5150 = '[ruby-dev:44327]'
+ assert_raise(TypeError, bug5150) {Encoding.find(1)}
end
def test_replicate
@@ -96,15 +99,4 @@ class TestEncoding < Test::Unit::TestCase
str2 = Marshal.load(Marshal.dump(str2))
assert_equal(str, str2, '[ruby-dev:38596]')
end
-
- def test_unsafe
- bug5279 = '[ruby-dev:44469]'
- assert_ruby_status([], '$SAFE=3; "a".encode("utf-16be")', bug5279)
- end
-
- def test_compatible_p
- ua = "abc".force_encoding(Encoding::UTF_8)
- assert_equal(Encoding::UTF_8, Encoding.compatible?(ua, :abc))
- assert_equal(nil, Encoding.compatible?(ua, 1))
- end
end