ruby-changes:8122
From: matz <ko1@a...>
Date: Wed, 1 Oct 2008 02:58:42 +0900 (JST)
Subject: [ruby-changes:8122] Ruby:r19650 (trunk): * io.c (rb_io_extract_modeenc): should honor value of the
matz 2008-10-01 02:55:25 +0900 (Wed, 01 Oct 2008) New Revision: 19650 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19650 Log: * io.c (rb_io_extract_modeenc): should honor value of the textmode: and binmode: options. Modified files: trunk/ChangeLog trunk/io.c Index: ChangeLog =================================================================== --- ChangeLog (revision 19649) +++ ChangeLog (revision 19650) @@ -45,6 +45,11 @@ * lib/test/unit/testcase.rb: ditto. +Tue Sep 30 20:17:26 2008 Yukihiro Matsumoto <matz@r...> + + * io.c (rb_io_extract_modeenc): should honor value of the + textmode: and binmode: options. + Tue Sep 30 17:04:59 2008 Yukihiro Matsumoto <matz@r...> * test/bigdecimal/test_bigdecimal.rb (test_sqrt_bigdecimal): wrong Index: io.c =================================================================== --- io.c (revision 19649) +++ io.c (revision 19650) @@ -3922,10 +3922,10 @@ else { VALUE v; v = rb_hash_aref(opthash, sym_textmode); - if (!NIL_P(v)) + if (!NIL_P(v) && RTEST(v)) fmode |= FMODE_TEXTMODE; v = rb_hash_aref(opthash, sym_binmode); - if (!NIL_P(v)) { + if (!NIL_P(v) && RTEST(v)) { fmode |= FMODE_BINMODE; #ifdef O_BINARY oflags |= O_BINARY; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/