summaryrefslogtreecommitdiffstats
path: root/rational.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 10:14:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-31 10:14:42 +0000
commit4aa2d7c25d7557a77ff87ea3d8a7349edc33807c (patch)
tree122bbc971d37cb761b214645e2e0b9b4414eab6f /rational.c
parentd682b47684d0a7d775ff7d849ecce08d1b530a25 (diff)
downloadruby-4aa2d7c25d7557a77ff87ea3d8a7349edc33807c.tar.gz
ruby-4aa2d7c25d7557a77ff87ea3d8a7349edc33807c.tar.xz
ruby-4aa2d7c25d7557a77ff87ea3d8a7349edc33807c.zip
* numeric.c (num_quo): should convert its operand to Rational.
* rational.c (string_to_r_strict): should raise TypeError. * bignum.c (Init_Bignum): should not redefine Bignum#div. Numeric#div will do. [ruby-dev:34066] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rational.c b/rational.c
index 7165e9323..90b227faf 100644
--- a/rational.c
+++ b/rational.c
@@ -1432,7 +1432,7 @@ string_to_r_strict(VALUE self)
VALUE a = string_to_r_internal(self);
if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) {
VALUE s = f_inspect(self);
- rb_raise(rb_eArgError, "invalid value for Rational: %s",
+ rb_raise(rb_eTypeError, "invalid value for Rational: %s",
StringValuePtr(s));
}
return RARRAY_PTR(a)[0];