[前][次][番号順一覧][スレッド一覧]

ruby-changes:6201

From: shyouhei <ko1@a...>
Date: Sun, 29 Jun 2008 21:25:09 +0900 (JST)
Subject: [ruby-changes:6201] Ruby:r17713 (ruby_1_8_7): * array.c (rb_ary_fill): (compatibility) do not raise

shyouhei	2008-06-29 21:24:52 +0900 (Sun, 29 Jun 2008)

  New Revision: 17713

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/array.c
    branches/ruby_1_8_7/version.h

  Log:
    * array.c (rb_ary_fill): (compatibility) do not raise
      ArgumentError on negative length.  This behaviour shall change
      	  in a future release.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/ChangeLog?r1=17713&r2=17712&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/version.h?r1=17713&r2=17712&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_7/array.c?r1=17713&r2=17712&diff_format=u

Index: ruby_1_8_7/array.c
===================================================================
--- ruby_1_8_7/array.c	(revision 17712)
+++ ruby_1_8_7/array.c	(revision 17713)
@@ -2416,6 +2416,9 @@
 	break;
     }
     rb_ary_modify(ary);
+    if (len < 0) {
+        return ary;
+    }
     if (len > ARY_MAX_SIZE - beg) {
 	rb_raise(rb_eArgError, "argument too big");
     }
Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 17712)
+++ ruby_1_8_7/ChangeLog	(revision 17713)
@@ -1,3 +1,9 @@
+Sun Jun 29 21:20:17 2008  URABE Shyouhei  <shyouhei@r...>
+
+	* 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@f...>
 
 	* time.c (time_timeval): fix rounding negative float.
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 17712)
+++ ruby_1_8_7/version.h	(revision 17713)
@@ -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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]