diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-29 12:24:52 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-29 12:24:52 +0000 |
commit | 09cb662a8ab70b7a46310f50d295b0af4a526e5d (patch) | |
tree | a48ecbefb1b4f07f7f4a7d2254a7fabb49c49429 | |
parent | 7c1aaff1eb18c836c620096f0fc05e2f8fc629a3 (diff) |
* 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_7@17713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | array.c | 3 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun Jun 29 21:20:17 2008 URABE Shyouhei <shyouhei@ruby-lang.org> + + * array.c (rb_ary_fill): (compatibility) do not raise + ArgumentError on negative length. This behaviour shall change + in a future release. + Sun Jun 29 20:08:11 2008 Tanaka Akira <akr@fsij.org> * time.c (time_timeval): fix rounding negative float. @@ -2416,6 +2416,9 @@ rb_ary_fill(argc, argv, ary) break; } rb_ary_modify(ary); + if (len < 0) { + return ary; + } if (len > ARY_MAX_SIZE - beg) { rb_raise(rb_eArgError, "argument too big"); } @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2008-06-29" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20080629 -#define RUBY_PATCHLEVEL 36 +#define RUBY_PATCHLEVEL 37 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |