* numeric.c: "%" is required before PRI?VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-05-27 23:43:46 +00:00
Родитель 1cdd1249e8
Коммит 85f554594a
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Wed May 28 08:42:51 2008 Tanaka Akira <akr@fsij.org>
* numeric.c: "%" is required before PRI?VALUE.
Tue May 27 22:10:44 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval_error.c (error_handle): SystemExit and SignalException throws

Просмотреть файл

@ -1574,14 +1574,14 @@ check_int(SIGNED_VALUE num)
else {
return;
}
rb_raise(rb_eRangeError, "integer " PRIdVALUE " too %s to convert to `int'", num, s);
rb_raise(rb_eRangeError, "integer %"PRIdVALUE " too %s to convert to `int'", num, s);
}
static void
check_uint(VALUE num)
{
if (num > UINT_MAX) {
rb_raise(rb_eRangeError, "integer " PRIuVALUE " too big to convert to `unsigned int'", num);
rb_raise(rb_eRangeError, "integer %"PRIuVALUE " too big to convert to `unsigned int'", num);
}
}
@ -1651,7 +1651,7 @@ rb_num2fix(VALUE val)
v = rb_num2long(val);
if (!FIXABLE(v))
rb_raise(rb_eRangeError, "integer " PRIdVALUE " out of range of fixnum", v);
rb_raise(rb_eRangeError, "integer %"PRIdVALUE " out of range of fixnum", v);
return LONG2FIX(v);
}
@ -1879,7 +1879,7 @@ int_chr(int argc, VALUE *argv, VALUE num)
case 0:
if (i < 0 || 0xff < i) {
out_of_range:
rb_raise(rb_eRangeError, PRIdVALUE " out of char range", i);
rb_raise(rb_eRangeError, "%"PRIdVALUE " out of char range", i);
}
c = i;
if (i < 0x80) {