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_5@13451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f5df75e73
commit
30e693220e
3 changed files with 12 additions and 5 deletions
|
|
@ -1,3 +1,7 @@
|
|||
Mon Sep 17 04:31:46 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* range.c (range_step): fixed integer overflow. [ruby-dev:31763]
|
||||
|
||||
Fri Sep 7 14:57:36 2007 URABE Shyouhei <shyouhei@ice.uec.ac.jp>
|
||||
|
||||
* ruby.c (rubylib_mangled_path): eliminate RSTRING_PTR
|
||||
|
|
|
|||
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 (!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 {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#define RUBY_VERSION "1.8.5"
|
||||
#define RUBY_RELEASE_DATE "2007-09-07"
|
||||
#define RUBY_RELEASE_DATE "2007-09-17"
|
||||
#define RUBY_VERSION_CODE 185
|
||||
#define RUBY_RELEASE_CODE 20070907
|
||||
#define RUBY_PATCHLEVEL 109
|
||||
#define RUBY_RELEASE_CODE 20070917
|
||||
#define RUBY_PATCHLEVEL 110
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
#define RUBY_VERSION_TEENY 5
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 9
|
||||
#define RUBY_RELEASE_DAY 7
|
||||
#define RUBY_RELEASE_DAY 17
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue