diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-18 13:41:44 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-18 13:41:44 +0000 |
commit | 67f93ddc216c56298aeb9981fc36649987438457 (patch) | |
tree | ceacba47fb0d461ee9846a40f194c2a87544bbb3 /test/ruby/test_complex.rb | |
parent | 430eb945ceeec646f30ee79302d2f265b25bc1ee (diff) | |
download | ruby-67f93ddc216c56298aeb9981fc36649987438457.tar.gz |
* rational.c (nurat_s_convert): calls to_r when the given argument
is non-integer.
* rational.c (nurat_s_convert): raises TypeError when the given
argument is nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r-- | test/ruby/test_complex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 39a02044fa..846fcf9a3e 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -126,8 +126,8 @@ class Complex_Test < Test::Unit::TestCase if @rational && !@keiju assert_equal(Complex(1,1),Complex('3/3','3/3')) end - assert_raise(ArgumentError){Complex(nil)} - assert_raise(ArgumentError){Complex(Object.new)} + assert_raise(TypeError){Complex(nil)} + assert_raise(TypeError){Complex(Object.new)} assert_raise(ArgumentError){Complex()} assert_raise(ArgumentError){Complex(1,2,3)} |