From e0d0043ac9a18a48739e41efbc16ed0ba3ade35b Mon Sep 17 00:00:00 2001 From: tadf Date: Mon, 29 Dec 2008 14:26:16 +0000 Subject: * bignum.c (rb_cstr_to_inum): changed an error message. * complex.c (string_to_c_strict): ditto. * rational.c (string_to_r_strict): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ bignum.c | 2 +- complex.c | 2 +- rational.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cad5e9be..ceb17bf3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Dec 29 23:18:52 2008 Tadayoshi Funaba + + * bignum.c (rb_cstr_to_inum): changed an error message. + + * complex.c (string_to_c_strict): ditto. + + * rational.c (string_to_r_strict): ditto. + Mon Dec 29 22:37:57 2008 Yukihiro Matsumoto * pack.c (pack_pack): template f should not accept non float diff --git a/bignum.c b/bignum.c index 4a81a314f..dec147ae3 100644 --- a/bignum.c +++ b/bignum.c @@ -583,7 +583,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck) while (*str && ISSPACE(*str)) str++; if (*str) { bad: - rb_invalid_str(s, "Integer"); + rb_invalid_str(s, "Integer()"); } } diff --git a/complex.c b/complex.c index 390658b48..49ce51f90 100644 --- a/complex.c +++ b/complex.c @@ -1210,7 +1210,7 @@ string_to_c_strict(VALUE self) VALUE a = string_to_c_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 Complex: %s", + rb_raise(rb_eArgError, "invalid value for convert(): %s", StringValuePtr(s)); } return RARRAY_PTR(a)[0]; diff --git a/rational.c b/rational.c index 7e81d4b43..c90949377 100644 --- a/rational.c +++ b/rational.c @@ -1438,7 +1438,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_eArgError, "invalid value for convert(): %s", StringValuePtr(s)); } return RARRAY_PTR(a)[0]; -- cgit