aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_complex.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r--test/ruby/test_complex.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index 8da0e51644..de3bb05d6c 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -427,6 +427,9 @@ class Complex_Test < Test::Unit::TestCase
assert_equal([Complex(Rational(2)),Complex(1)],
Complex(1).coerce(Rational(2)))
assert_equal([Complex(2),Complex(1)], Complex(1).coerce(Complex(2)))
+
+ obj = eval("class C\u{1f5ff}; self; end").new
+ assert_raise_with_message(TypeError, /C\u{1f5ff}/) { Complex(1).coerce(obj) }
end
class ObjectX