summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-13 06:06:12 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-13 06:06:12 +0000
commitd453b1a042a4483e74b17d66c7d88ec0c60b964a (patch)
treed7002843f9d61ce16600dc630e01fcb8b6c8845c /array.c
parent4af06a86de87b9f12751fb155d10c1f9e453097a (diff)
signal to main_thread
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/array.c b/array.c
index b517fa3..a53554b 100644
--- a/array.c
+++ b/array.c
@@ -306,6 +306,9 @@ ary_subseq(ary, beg, len)
beg = RARRAY(ary)->len + beg;
if (beg < 0) beg = 0;
}
+ if (beg >= RARRAY(ary)->len) {
+ IndexError("out of range %d", beg);
+ }
if (len < 0) {
IndexError("negative length %d", RARRAY(ary)->len);
}
@@ -1164,7 +1167,7 @@ ary_uniq_bang(ary)
}
end = t;
}
- if (RARRAY(ary)->len = (end - RARRAY(ary)->ptr)) {
+ if (RARRAY(ary)->len == (end - RARRAY(ary)->ptr)) {
return Qnil;
}