summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 f1368bc871..373d9fecb2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/array.c b/array.c
index f4ed6e67d8..9eda004130 100644
--- a/array.c
+++ b/array.c
@@ -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");
}
diff --git a/version.h b/version.h
index e42ed38556..e3ef174e5d 100644
--- a/version.h
+++ b/version.h
@@ -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