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
commit72267e8dbfd193c5494037e4974fa45c70002be6 (patch)
treec9f2a35cc509166a9527651168084fbddc474ca3 /bignum.c
parent2ed799f834d30e7f89fb92dd4d109ac00d46e7b3 (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/branches/ruby_1_6@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 9882c69401..521393545b 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') {