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/branches/ruby_1_8_6@13453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
09edb78ff0
commit
b3376c4df6
3 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Mon Sep 17 04:37:10 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* range.c (range_step): fixed integer overflow. [ruby-dev:31763]
|
||||||
|
|
||||||
Fri Sep 7 17:06:16 2007 Vincent Isambart <vincent.isambart@gmail.com>
|
Fri Sep 7 17:06:16 2007 Vincent Isambart <vincent.isambart@gmail.com>
|
||||||
|
|
||||||
* eval.c (rb_thread_start_0): should unset time_thread_alive_p.
|
* eval.c (rb_thread_start_0): should unset time_thread_alive_p.
|
||||||
|
|
5
range.c
5
range.c
|
@ -319,8 +319,11 @@ range_step(argc, argv, range)
|
||||||
|
|
||||||
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
|
if (unit == 0) rb_raise(rb_eArgError, "step can't be 0");
|
||||||
if (!EXCL(range)) end += 1;
|
if (!EXCL(range)) end += 1;
|
||||||
for (i=FIX2LONG(b); i<end; i+=unit) {
|
i = FIX2LONG(b);
|
||||||
|
while (i < end) {
|
||||||
rb_yield(LONG2NUM(i));
|
rb_yield(LONG2NUM(i));
|
||||||
|
if (i + unit < i) break;
|
||||||
|
i += unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
#define RUBY_VERSION "1.8.6"
|
#define RUBY_VERSION "1.8.6"
|
||||||
#define RUBY_RELEASE_DATE "2007-09-07"
|
#define RUBY_RELEASE_DATE "2007-09-17"
|
||||||
#define RUBY_VERSION_CODE 186
|
#define RUBY_VERSION_CODE 186
|
||||||
#define RUBY_RELEASE_CODE 20070907
|
#define RUBY_RELEASE_CODE 20070917
|
||||||
#define RUBY_PATCHLEVEL 101
|
#define RUBY_PATCHLEVEL 102
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
#define RUBY_VERSION_TEENY 6
|
#define RUBY_VERSION_TEENY 6
|
||||||
#define RUBY_RELEASE_YEAR 2007
|
#define RUBY_RELEASE_YEAR 2007
|
||||||
#define RUBY_RELEASE_MONTH 9
|
#define RUBY_RELEASE_MONTH 9
|
||||||
#define RUBY_RELEASE_DAY 7
|
#define RUBY_RELEASE_DAY 17
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue