Skip to content

Commit 01d105e

Browse files
committed
* array.c (rb_ary_fill): (compatibility) do not raise
ArgumentError on negative length. This behaviour shall change in a future release. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent a4884ed commit 01d105e

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Sun Jun 29 20:40:57 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
2+
3+
* array.c (rb_ary_fill): (compatibility) do not raise
4+
ArgumentError on negative length. This behaviour shall change
5+
in a future release.
6+
17
Sun Jun 29 20:06:45 2008 Tanaka Akira <akr@fsij.org>
28

39
* time.c (time_timeval): fix rounding negative float.

array.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,6 +2272,9 @@ rb_ary_fill(argc, argv, ary)
22722272
break;
22732273
}
22742274
rb_ary_modify(ary);
2275+
if (len < 0) {
2276+
return ary;
2277+
}
22752278
if (len > ARY_MAX_SIZE - beg) {
22762279
rb_raise(rb_eArgError, "argument too big");
22772280
}

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2008-06-29"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20080629
5-
#define RUBY_PATCHLEVEL 253
5+
#define RUBY_PATCHLEVEL 254
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)