summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-03 14:18:26 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-03 14:18:26 +0000
commit215b8092a7821700baa8b89bac010db721891f99 (patch)
tree18748019eff9d766bc1c627ac6942ac6701c9424 /complex.c
parentb81e04571299a8e98d3931be9c10b9b63da375a8 (diff)
* 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
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c2
1 files changed, 1 insertions, 1 deletions
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");
}
}