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

ruby-changes:26944

From: zzak <ko1@a...>
Date: Thu, 31 Jan 2013 15:38:54 +0900 (JST)
Subject: [ruby-changes:26944] zzak:r38996 (trunk): * string.c (rb_str_aset_m): Documentation for String#[]= fix

zzak	2013-01-31 15:38:43 +0900 (Thu, 31 Jan 2013)

  New Revision: 38996

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38996

  Log:
    * string.c (rb_str_aset_m): Documentation for String#[]= fix
      Raises an IndexError if Regexp match is out of range.
      Github fixes #243 Patch by Dmtiriy Budnik

  Modified files:
    trunk/ChangeLog
    trunk/string.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38995)
+++ ChangeLog	(revision 38996)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jan 31 15:39:00 2013  Zachary Scott  <zachary@z...>
+
+	* string.c (rb_str_aset_m): Documentation for String#[]= fix
+	  Raises an IndexError if Regexp match is out of range.
+	  Github fixes #243 Patch by Dmtiriy Budnik
+
 Thu Jan 31 13:54:44 2013  Shugo Maeda  <shugo@r...>
 
 	* ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): return
Index: string.c
===================================================================
--- string.c	(revision 38995)
+++ string.c	(revision 38996)
@@ -3531,7 +3531,7 @@ rb_str_aset(VALUE str, VALUE indx, VALUE https://github.com/ruby/ruby/blob/trunk/string.c#L3531
  *  <code>Fixnum</code> will raise an <code>IndexError</code> if the value is
  *  out of range; the <code>Range</code> form will raise a
  *  <code>RangeError</code>, and the <code>Regexp</code> and <code>String</code>
- *  forms will silently ignore the assignment.
+ *  will raise an <code>IndexError</code> on negative match.
  */
 
 static VALUE

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

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