ruby-changes:17447
From: naruse <ko1@a...>
Date: Tue, 12 Oct 2010 17:56:05 +0900 (JST)
Subject: [ruby-changes:17447] Ruby:r29452 (trunk): * numeric (check_uint): the mask must refer to VALUE.
naruse 2010-10-12 17:56:00 +0900 (Tue, 12 Oct 2010) New Revision: 29452 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29452 Log: * numeric (check_uint): the mask must refer to VALUE. Modified files: trunk/ChangeLog trunk/numeric.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29451) +++ ChangeLog (revision 29452) @@ -1,3 +1,7 @@ +Tue Oct 12 17:53:49 2010 NARUSE, Yui <naruse@r...> + + * numeric (check_uint): the mask must refer to VALUE. + Tue Oct 12 17:47:10 2010 NARUSE, Yui <naruse@r...> * numeric (check_uint): set MSB for negative value. Index: numeric.c =================================================================== --- numeric.c (revision 29451) +++ numeric.c (revision 29452) @@ -1791,8 +1791,8 @@ if (RTEST(sign)) { /* minus */ if ((num & mask) != mask || (num & ~mask) <= INT_MAX + 1UL) -#define MSBMASK (1L << ((sizeof(long) * CHAR_BIT) - 1)) - rb_raise(rb_eRangeError, "integer %"PRIdVALUE " too small to convert to `unsigned int'", num|MSBMASK); +#define VALUE_MSBMASK (1L << ((sizeof(VALUE) * CHAR_BIT) - 1)) + rb_raise(rb_eRangeError, "integer %"PRIdVALUE " too small to convert to `unsigned int'", num|VALUE_MSBMASK); } else { /* plus */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/