summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--bignum.c15
-rw-r--r--version.h4
3 files changed, 9 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 124f27a95d..f9ef673941 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Dec 27 18:43:04 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * bignum.c (rb_cstr2inum): deny "0_".
+
Thu Dec 27 01:54:02 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
* bignum.c (rb_cstr2inum): allow "0\n" and so on.
diff --git a/bignum.c b/bignum.c
index 3b62b28442..38513c2373 100644
--- a/bignum.c
+++ b/bignum.c
@@ -241,18 +241,9 @@ rb_cstr2inum(str, base)
}
len = 4;
}
- if (*str == '0') {
- do str++; while (*str == '0');
- if (!*str) return INT2FIX(0);
- while (*str == '_') str++;
- if (!*str) str--;
- if (ISSPACE(*str)) {
- if (badcheck) {
- while (ISSPACE(*str)) str++;
- if (*str) goto bad;
- }
- return INT2FIX(0);
- }
+ if (*str == '0') { /* squeeze preceeding 0s */
+ while (*++str == '0');
+ --str;
}
len *= strlen(str)*sizeof(char);
diff --git a/version.h b/version.h
index f27d5269be..c53b62568a 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.7.2"
-#define RUBY_RELEASE_DATE "2001-12-26"
+#define RUBY_RELEASE_DATE "2001-12-27"
#define RUBY_VERSION_CODE 172
-#define RUBY_RELEASE_CODE 20011226
+#define RUBY_RELEASE_CODE 20011227