ruby-changes:17449
From: naruse <ko1@a...>
Date: Tue, 12 Oct 2010 18:31:28 +0900 (JST)
Subject: [ruby-changes:17449] Ruby:r29454 (trunk): * io.c (rb_io_ungetc): always see Bignum. On 32bit valid value
naruse 2010-10-12 18:30:42 +0900 (Tue, 12 Oct 2010) New Revision: 29454 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29454 Log: * io.c (rb_io_ungetc): always see Bignum. On 32bit valid value may be a Bignum. On 64bit for errors. [ruby-dev:42366] Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29453) +++ ChangeLog (revision 29454) @@ -1,3 +1,8 @@ +Tue Oct 12 18:25:43 2010 NARUSE, Yui <naruse@r...> + + * io.c (rb_io_ungetc): always see Bignum. On 32bit valid value + may be a Bignum. On 64bit for errors. [ruby-dev:42366] + Tue Oct 12 18:25:04 2010 NARUSE, Yui <naruse@r...> * string.c (rb_str_concat): use unsigned int for GB18030. Index: io.c =================================================================== --- io.c (revision 29453) +++ io.c (revision 29454) @@ -3231,11 +3231,9 @@ if (FIXNUM_P(c)) { c = rb_enc_uint_chr(FIX2UINT(c), io_read_encoding(fptr)); } -#if SIZEOF_LONG > SIZEOF_INT else if (TYPE(c) == T_BIGNUM) { c = rb_enc_uint_chr(NUM2UINT(c), io_read_encoding(fptr)); } -#endif else { SafeStringValue(c); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/