From 67f93ddc216c56298aeb9981fc36649987438457 Mon Sep 17 00:00:00 2001 From: tadf Date: Thu, 18 Jun 2009 13:41:44 +0000 Subject: * 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 --- test/ruby/test_complex.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_complex.rb') 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)} -- cgit v1.2.3