summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-22 05:57:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-22 05:57:08 +0000
commita84982e1292e8e854ab289d3d3c2ae86a195e1b3 (patch)
tree9e01fb4005a33ef34910b9d8f6f8fb2b8654db46
parentedbe98d848e4872654bb5273a6a8250492026c18 (diff)
minor bug fixes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--array.c6
-rw-r--r--compar.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/array.c b/array.c
index 1c8172aef4b..ee69729e3bd 100644
--- a/array.c
+++ b/array.c
@@ -1275,7 +1275,7 @@ rb_ary_slice_bang(argc, argv, ary)
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
pos = NUM2LONG(arg1);
len = NUM2LONG(arg2);
-delete_pos_len:
+ delete_pos_len:
if (pos < 0) {
pos = RARRAY(ary)->len + pos;
}
@@ -1288,9 +1288,7 @@ delete_pos_len:
goto delete_pos_len;
}
- rb_ary_delete_at(ary, NUM2LONG(arg1));
-
- return arg2;
+ return rb_ary_delete_at(ary, NUM2LONG(arg1));
}
static VALUE
diff --git a/compar.c b/compar.c
index 43e31693f34..ebdd47a8d79 100644
--- a/compar.c
+++ b/compar.c
@@ -22,7 +22,7 @@ cmp_equal(x, y)
{
VALUE c = rb_funcall(x, cmp, 1, y);
- if (NIL_P(c)) return Qnil;
+ if (NIL_P(c)) return Qfalse;
if (NUM2LONG(c) == 0) return Qtrue;
return Qfalse;
}