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 ffdd24df79..e80b5b5ab6 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6,7 +6,7 @@
$Date$
created at: Fri Jun 10 00:48:55 JST 1994
- Copyright (C) 1993-2001 Yukihiro Matsumoto
+ Copyright (C) 1993-2002 Yukihiro Matsumoto
**********************************************************************/
@@ -351,7 +351,7 @@ rb_str2inum(str, base)
p[len] = '\0';
s = p;
}
- if (len != strlen(s)) {
+ if (base == 0 && len != strlen(s)) {
rb_raise(rb_eArgError, "string for Integer contains null byte");
}
return rb_cstr2inum(s, base);