summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index 38513c2373..ffdd24df79 100644
--- a/bignum.c
+++ b/bignum.c
@@ -252,11 +252,11 @@ rb_cstr2inum(str, base)
if (*end == '_') goto bigparse;
if (badcheck) {
- if (end == str) goto bad; /* no number */
while (*end && ISSPACE(*end)) end++;
+ if (end == str) goto bad; /* no number */
if (*end) { /* trailing garbage */
bad:
- rb_raise(rb_eArgError, "invalid value for Integer: \"%s\"", s);
+ rb_invalid_str(s, "Integer");
}
}