summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--range.c5
-rw-r--r--version.h6
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5dbfe8a..3ee181c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,15 @@
+<<<<<<< current
Sun Sep 9 09:14:45 2007 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (_strptime): now also attaches an element
which denotes leftover substring if exists.
+=======
+Mon Sep 10 01:05:25 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * range.c (range_step): fixed integer overflow. [ruby-dev:31763]
+
+>>>>>>> patched
Sat Sep 8 10:22:20 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* struct.c (rb_struct_s_members): should raise TypeError instead
diff --git a/range.c b/range.c
index 3f575de..568b24d 100644
--- a/range.c
+++ b/range.c
@@ -319,8 +319,11 @@ range_step(argc, argv, range)
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
if (!EXCL(range)) end += 1;
- for (i=FIX2LONG(b); i<end; i+=unit) {
+ i = FIX2LONG(b);
+ while (i < end) {
rb_yield(LONG2NUM(i));
+ if (i + unit < i) break;
+ i += unit;
}
}
else {
diff --git a/version.h b/version.h
index 28498ca..77dc044 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-09-08"
+#define RUBY_RELEASE_DATE "2007-09-10"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20070908
+#define RUBY_RELEASE_CODE 20070910
#define RUBY_PATCHLEVEL 5000
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 9
-#define RUBY_RELEASE_DAY 8
+#define RUBY_RELEASE_DAY 10
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];