* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-12-29 14:26:16 +00:00
parent ad00464489
commit c7e236efc1
4 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,11 @@
Mon Dec 29 23:18:52 2008 Tadayoshi Funaba <tadf@dotrb.org>
* 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 <matz@ruby-lang.org> Mon Dec 29 22:37:57 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* pack.c (pack_pack): template f should not accept non float * pack.c (pack_pack): template f should not accept non float

View File

@ -583,7 +583,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
while (*str && ISSPACE(*str)) str++; while (*str && ISSPACE(*str)) str++;
if (*str) { if (*str) {
bad: bad:
rb_invalid_str(s, "Integer"); rb_invalid_str(s, "Integer()");
} }
} }

View File

@ -1210,7 +1210,7 @@ string_to_c_strict(VALUE self)
VALUE a = string_to_c_internal(self); VALUE a = string_to_c_internal(self);
if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) { if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) {
VALUE s = f_inspect(self); 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)); StringValuePtr(s));
} }
return RARRAY_PTR(a)[0]; return RARRAY_PTR(a)[0];

View File

@ -1438,7 +1438,7 @@ string_to_r_strict(VALUE self)
VALUE a = string_to_r_internal(self); VALUE a = string_to_r_internal(self);
if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) { if (NIL_P(RARRAY_PTR(a)[0]) || RSTRING_LEN(RARRAY_PTR(a)[1]) > 0) {
VALUE s = f_inspect(self); 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)); StringValuePtr(s));
} }
return RARRAY_PTR(a)[0]; return RARRAY_PTR(a)[0];