From 215b8092a7821700baa8b89bac010db721891f99 Mon Sep 17 00:00:00 2001 From: marcandre Date: Wed, 3 Mar 2010 14:18:26 +0000 Subject: * 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) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- complex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index 214d3a24ca..67422572df 100644 --- a/complex.c +++ b/complex.c @@ -377,7 +377,7 @@ nucomp_real_check(VALUE num) 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"); } } -- cgit v1.2.3