ruby-changes:5153
From: matz <ko1@a...>
Date: Tue, 27 May 2008 21:45:08 +0900 (JST)
Subject: [ruby-changes:5153] Ruby:r16648 (trunk): * numeric.c (check_int): use PRIxVALUE format specifier.
matz 2008-05-27 21:44:52 +0900 (Tue, 27 May 2008) New Revision: 16648 Modified files: trunk/ChangeLog trunk/numeric.c Log: * numeric.c (check_int): use PRIxVALUE format specifier. * numeric.c (check_uint, rb_num2fix, int_chr): ditto. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/numeric.c?r1=16648&r2=16647&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16648&r2=16647&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16647) +++ ChangeLog (revision 16648) @@ -22,6 +22,12 @@ * ext/stringio/stringio.c (strio_each_byte): Return self instead of nil as the rdoc says. +Tue May 27 15:36:27 2008 Yukihiro Matsumoto <matz@r...> + + * numeric.c (check_int): use PRIxVALUE format specifier. + + * numeric.c (check_uint, rb_num2fix, int_chr): ditto. + Tue May 27 13:14:53 2008 Akinori MUSHA <knu@i...> * enum.c (enum_to_a): Pass arguments through to #each(). Index: numeric.c =================================================================== --- numeric.c (revision 16647) +++ numeric.c (revision 16648) @@ -1559,22 +1559,14 @@ else { return; } -#ifdef LONG_LONG_VALUE - rb_raise(rb_eRangeError, "integer %lld too %s to convert to `int'", num, s); -#else - rb_raise(rb_eRangeError, "integer %ld too %s to convert to `int'", num, s); -#endif + rb_raise(rb_eRangeError, "integer " PRIdVALUE " too %s to convert to `int'", num, s); } static void check_uint(VALUE num) { if (num > UINT_MAX) { -#ifdef LONG_LONG_VALUE - rb_raise(rb_eRangeError, "integer %llu too big to convert to `unsigned int'", num); -#else - rb_raise(rb_eRangeError, "integer %lu too big to convert to `unsigned int'", num); -#endif + rb_raise(rb_eRangeError, "integer " PRIuVALUE " too big to convert to `unsigned int'", num); } } @@ -1644,7 +1636,7 @@ v = rb_num2long(val); if (!FIXABLE(v)) - rb_raise(rb_eRangeError, "integer %ld out of range of fixnum", v); + rb_raise(rb_eRangeError, "integer " PRIdVALUE " out of range of fixnum", v); return LONG2FIX(v); } @@ -1872,7 +1864,7 @@ case 0: if (i < 0 || 0xff < i) { out_of_range: - rb_raise(rb_eRangeError, "%ld out of char range", i); + rb_raise(rb_eRangeError, PRIdVALUE " out of char range", i); } c = i; if (i < 0x80) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/