summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-14 04:45:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-14 04:45:46 +0000
commit53ff8df72f5e2fc6318a25474bd8c3950a2c7c29 (patch)
tree7dc5a4dbee4d7fb9df19bd0c5b856e3ea0bc2f85 /bignum.c
parenta22cbaa697e28789acfba1204f502d62e4db8fab (diff)
* eval.c (rb_yield_0): 0 (= Qfalse) is a valid value, so that
default self should be checked by klass == 0. * bignum.c (rb_cstr2inum): should disallow '++1', '+-1', etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index bc4733408b..63384f7ab2 100644
--- a/bignum.c
+++ b/bignum.c
@@ -209,6 +209,10 @@ rb_cstr2inum(str, base)
str++;
sign = 0;
}
+ if (str[0] == '+' || str[0] == '-') {
+ if (badcheck) goto bad;
+ return INT2FIX(0);
+ }
if (base == 0) {
if (str[0] == '0') {
if (str[1] == 'x' || str[1] == 'X') {