From e56c7878cfa6e0d68cfaf931ec6d106b6468f88d Mon Sep 17 00:00:00 2001 From: zzak Date: Thu, 31 Jan 2013 06:38:43 +0000 Subject: [PATCH] * 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ string.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8fc2116f4a..f75e75c38c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 31 15:39:00 2013 Zachary Scott + + * 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 * ext/socket/raddrinfo.c (rsock_unix_sockaddr_len): return diff --git a/string.c b/string.c index d0c30c6c7b..017617aaf1 100644 --- a/string.c +++ b/string.c @@ -3531,7 +3531,7 @@ rb_str_aset(VALUE str, VALUE indx, VALUE val) * Fixnum will raise an IndexError if the value is * out of range; the Range form will raise a * RangeError, and the Regexp and String - * forms will silently ignore the assignment. + * will raise an IndexError on negative match. */ static VALUE