summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_float.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index 7cbf3b5a8f..a94bbce49e 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -764,6 +764,9 @@ class TestFloat < Test::Unit::TestCase
assert_raise_with_message(ArgumentError, /xxx/) {
1.0.round(half: "\0xxx")
}
+ assert_raise_with_message(Encoding::CompatibilityError, /ASCII incompatible/) {
+ 1.0.round(half: "up".force_encoding("utf-16be"))
+ }
end
def test_Float