mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (rb_str_slice_bang): raise error when the string is frozen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b49993b726
commit
1890364e90
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Mar 3 18:59:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_slice_bang): raise error when the string is frozen.
|
||||
|
||||
Thu Mar 3 14:25:19 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* strftime.c (STRFTIME): return 0 and ERANGE when precision is too
|
||||
|
|
2
string.c
2
string.c
|
@ -3503,9 +3503,9 @@ rb_str_slice_bang(int argc, VALUE *argv, VALUE str)
|
|||
for (i=0; i<argc; i++) {
|
||||
buf[i] = argv[i];
|
||||
}
|
||||
str_modify_keep_cr(str);
|
||||
result = rb_str_aref_m(argc, buf, str);
|
||||
if (!NIL_P(result)) {
|
||||
str_modify_keep_cr(str);
|
||||
buf[i] = rb_str_new(0,0);
|
||||
rb_str_aset_m(argc+1, buf, str);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue