summaryrefslogtreecommitdiffstats
path: root/array.c
diff options
context:
space:
mode:
authormichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-28 18:11:07 +0000
committermichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-28 18:11:07 +0000
commit2231bb6de2f1846a25a8aa9ee3b34ed684eeabd4 (patch)
tree855451ed5ef9925d8a76511fdd099be6198358c9 /array.c
parenta0a7d2dd8e26397081796200fea4e4f4b31e8ad5 (diff)
downloadruby-2231bb6de2f1846a25a8aa9ee3b34ed684eeabd4.tar.gz
ruby-2231bb6de2f1846a25a8aa9ee3b34ed684eeabd4.tar.xz
ruby-2231bb6de2f1846a25a8aa9ee3b34ed684eeabd4.zip
* array.c: fixed format string for 'long' args (%d -> %ld).
* class.c: ditto. * eval.c: ditto. * numeric.c: ditto. * pack.c: ditto. * parse.y: ditto. * range.c: ditto. * string.c: ditto. * util.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index ee69729e3..90acbce6e 100644
--- a/array.c
+++ b/array.c
@@ -292,7 +292,7 @@ rb_ary_store(ary, idx, val)
if (idx < 0) {
idx += RARRAY(ary)->len;
if (idx < 0) {
- rb_raise(rb_eIndexError, "index %d out of array",
+ rb_raise(rb_eIndexError, "index %ld out of array",
idx - RARRAY(ary)->len);
}
}
@@ -563,7 +563,7 @@ rb_ary_fetch(argc, argv, ary)
return rb_yield(pos);
}
if (argc == 1) {
- rb_raise(rb_eIndexError, "index %d out of array", idx);
+ rb_raise(rb_eIndexError, "index %ld out of array", idx);
}
return ifnone;
}
@@ -642,12 +642,12 @@ rb_ary_update(ary, beg, len, rpl)
rpl = rb_ary_to_ary(rpl);
rlen = RARRAY(rpl)->len;
- if (len < 0) rb_raise(rb_eIndexError, "negative length (%d)", len);
+ if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
if (beg < 0) {
beg += RARRAY(ary)->len;
if (beg < 0) {
beg -= RARRAY(ary)->len;
- rb_raise(rb_eIndexError, "index %d out of array", beg);
+ rb_raise(rb_eIndexError, "index %ld out of array", beg);
}
}
if (beg + len > RARRAY(ary)->len) {