summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-30 06:56:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-30 06:56:18 +0000
commit3e9e2bd4ed14de63e8e18e779a5e8c1060ea5bcf (patch)
tree873570181bc80e61f01eca31effb94af645c188c /array.c
parentad2c05f1c0947cbcc5dd86b00dda06bf4c391692 (diff)
* 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/array.c b/array.c
index 8c202a1fdc..8d173d8a06 100644
--- a/array.c
+++ b/array.c
@@ -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;
}