summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 12:18:44 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 12:18:44 +0000
commit01d105e6864f804483d484f5368d0ffe5db6b969 (patch)
treeb208518ea5d4ef10d2bc32a73fbac3abf3feea4e
parenta4884edb1ebb409ff3508b95a56a92df8ce493df (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_6@17711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--array.c3
-rw-r--r--version.h2
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1876bec3e9..2a32d764e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 29 20:40:57 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:06:45 2008 Tanaka Akira <akr@fsij.org>
* time.c (time_timeval): fix rounding negative float.
diff --git a/array.c b/array.c
index 7f23940e43..1387269993 100644
--- a/array.c
+++ b/array.c
@@ -2272,6 +2272,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");
}
diff --git a/version.h b/version.h
index 1dfa4840b4..9fdfda7684 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-29"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080629
-#define RUBY_PATCHLEVEL 253
+#define RUBY_PATCHLEVEL 254
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8