summaryrefslogtreecommitdiff
path: root/string.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
commitbab153b24385e3a27847707720837b4c749960ec (patch)
tree855451ed5ef9925d8a76511fdd099be6198358c9 /string.c
parentff3d6d201d72eaa0f21dc376d59f4ba2a3acad92 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@2498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string.c b/string.c
index 399f04c..fd58750 100644
--- a/string.c
+++ b/string.c
@@ -1198,10 +1198,10 @@ rb_str_update(str, beg, len, val)
long len;
VALUE val;
{
- if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
+ if (len < 0) rb_raise(rb_eIndexError, "negative length %ld", len);
if (RSTRING(str)->len < beg) {
out_of_range:
- rb_raise(rb_eIndexError, "index %d out of string", beg);
+ rb_raise(rb_eIndexError, "index %ld out of string", beg);
}
if (beg < 0) {
if (-beg > RSTRING(str)->len) {
@@ -1282,7 +1282,7 @@ rb_str_aset(str, indx, val)
idx = NUM2INT(indx);
if (RSTRING(str)->len <= idx) {
out_of_range:
- rb_raise(rb_eIndexError, "index %d out of string", idx);
+ rb_raise(rb_eIndexError, "index %ld out of string", idx);
}
if (idx < 0) {
if (-idx > RSTRING(str)->len)