ruby-changes:3335
From: ko1@a...
Date: 1 Jan 2008 17:51:42 +0900
Subject: [ruby-changes:3335] nobu - Ruby:r14828 (trunk): * io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode.
nobu 2008-01-01 17:50:49 +0900 (Tue, 01 Jan 2008) New Revision: 14828 Modified files: trunk/ChangeLog trunk/io.c Log: * io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode. [ruby-dev:32913] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14828&r2=14827&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14828&r2=14827&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 14827) +++ ChangeLog (revision 14828) @@ -1,3 +1,8 @@ +Tue Jan 1 17:50:47 2008 Nobuyoshi Nakada <nobu@r...> + + * io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode. + [ruby-dev:32913] + Tue Jan 1 14:41:56 2008 Yukihiro Matsumoto <matz@r...> * lib/rexml: 1.9 patch from Sam Ruby mentioned in his blog: Index: io.c =================================================================== --- io.c (revision 14827) +++ io.c (revision 14828) @@ -3192,6 +3192,9 @@ { const char *p = strchr(mode, ':'); if (p) { + if (fptr->mode & FMODE_BINMODE) { + rb_raise(rb_eArgError, "encoding in binary mode"); + } mode_enc(fptr, p+1); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml