diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-30 06:56:18 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-30 06:56:18 +0000 |
commit | 3e9e2bd4ed14de63e8e18e779a5e8c1060ea5bcf (patch) | |
tree | 873570181bc80e61f01eca31effb94af645c188c /array.c | |
parent | ad2c05f1c0947cbcc5dd86b00dda06bf4c391692 (diff) | |
download | ruby-3e9e2bd4ed14de63e8e18e779a5e8c1060ea5bcf.tar.gz |
* eval.c (rb_eval): NODE_XSTR should pass copy of literal string.
* array.c (rb_ary_update): a[n,m]=nil no longer works as element
deletion.
* enum.c (enum_sort_by): protect continuation jump in.
[ruby-dev:24642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1091,7 +1091,7 @@ rb_ary_update(ary, beg, len, rpl) } rb_ary_modify(ary); - if (NIL_P(rpl)) { + if (rpl == Qundef) { rlen = 0; } else { @@ -1683,7 +1683,7 @@ ary_sort_check(data) struct ary_sort_data *data; { if (RARRAY(data->ary)->ptr != data->ptr || RARRAY(data->ary)->len != data->len) { - rb_raise(rb_eArgError, "array modified during sort"); + rb_raise(rb_eRuntimeError, "array modified during sort"); } } @@ -2085,7 +2085,7 @@ rb_ary_slice_bang(argc, argv, ary) pos = RARRAY(ary)->len + pos; } arg2 = rb_ary_subseq(ary, pos, len); - rb_ary_update(ary, pos, len, Qnil); /* Qnil/rb_ary_new2(0) */ + rb_ary_update(ary, pos, len, Qundef); /* Qnil/rb_ary_new2(0) */ return arg2; } |