1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* range.c (range_step): fixed integer overflow. [ruby-dev:31763]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2007-09-09 16:11:28 +00:00
parent 8dc6147e3e
commit 3ee33a6dbc
3 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Mon Sep 10 01:05:25 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* range.c (range_step): fixed integer overflow. [ruby-dev:31763]
Sun Sep 9 08:57:27 2007 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (_strptime): now also attaches an element

View file

@ -332,8 +332,11 @@ range_step(int argc, VALUE *argv, VALUE range)
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 {

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-09-08"
#define RUBY_RELEASE_DATE "2007-09-10"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20070908
#define RUBY_RELEASE_CODE 20070910
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#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[];