From 20039668ddf425ab3430e06b1021bc86f2f30b4f Mon Sep 17 00:00:00 2001 From: tadf Date: Sat, 17 Nov 2012 14:57:22 +0000 Subject: * complex.c (make_patterns): should not accept extra sign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_complex.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_complex.rb') diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 332e026f0f..0a7828b85f 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -1154,6 +1154,7 @@ class Complex_Test < Test::Unit::TestCase assert_equal('-1.0-0.0i', Complex(-1.0, -0.0).to_s) assert_in_delta(Math::PI, Complex(-0.0).arg, 0.001) assert_equal(Complex(2e3, 2e4), '2e3+2e4i'.to_c) + assert_raise(ArgumentError){ Complex('--8i')} end def test_known_bug -- cgit v1.2.3