ruby-changes:14934
From: marcandre <ko1@a...>
Date: Wed, 3 Mar 2010 23:20:00 +0900 (JST)
Subject: [ruby-changes:14934] Ruby:r26805 (trunk): * complex.c (nucomp_real_check): raise TypeError instead of ArgumentError
marcandre 2010-03-03 23:18:26 +0900 (Wed, 03 Mar 2010) New Revision: 26805 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26805 Log: * complex.c (nucomp_real_check): raise TypeError instead of ArgumentError when argument is not a real as expected [ruby-core:28395] * rational.c (nurat_int_check): ditto (for integers) Modified files: trunk/ChangeLog trunk/complex.c trunk/rational.c Index: complex.c =================================================================== --- complex.c (revision 26804) +++ complex.c (revision 26805) @@ -377,7 +377,7 @@ break; default: if (!k_numeric_p(num) || !f_real_p(num)) - rb_raise(rb_eArgError, "not a real"); + rb_raise(rb_eTypeError, "not a real"); } } Index: ChangeLog =================================================================== --- ChangeLog (revision 26804) +++ ChangeLog (revision 26805) @@ -1,3 +1,11 @@ +Wed Mar 3 23:16:32 2010 Marc-Andre Lafortune <ruby-core@m...> + + * complex.c (nucomp_real_check): raise TypeError instead of + ArgumentError when argument is not a real as expected + [ruby-core:28395] + + * rational.c (nurat_int_check): ditto (for integers) + Wed Mar 3 23:07:08 2010 Marc-Andre Lafortune <ruby-core@m...> * lib/matrix.rb (Vector#each): Return self and optimization Index: rational.c =================================================================== --- rational.c (revision 26804) +++ rational.c (revision 26805) @@ -419,7 +419,7 @@ break; default: if (!k_numeric_p(num) || !f_integer_p(num)) - rb_raise(rb_eArgError, "not an integer"); + rb_raise(rb_eTypeError, "not an integer"); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/