From: WATANABE Hirofumi Date: 1997-11-15T01:08:53+09:00 Subject: [ruby-list:5297] Re: binmode (Re: rbc-0_5.gz) わたなべです. Shin-ichiro HARA writes: :便乗でリクエストしてしまうと、open に binmode オプションを :付けられないかしら。 : :f = open("fname", "br+") : :みたいに。 open は C の fopen までそのまんま伝わっていくので, f = open("fname", "rb+") や f = open("fname", "r+b") でいけます. といいたいところだけど, ちょっとまずいとこがあり ました. -- わたなべひろふみ --- io.c.orig Wed Oct 15 15:43:04 1997 +++ io.c Sat Nov 15 00:11:36 1997 @@ -1025,3 +1025,3 @@ Check_Type(pmode, T_STRING); - if (RSTRING(pmode)->len == 0 || RSTRING(pmode)->len > 2) + if (RSTRING(pmode)->len == 0 || RSTRING(pmode)->len > 3) ArgError("illegal access mode"); @@ -1060,3 +1060,3 @@ Check_Type(pmode, T_STRING); - if (RSTRING(pmode)->len == 0 || RSTRING(pmode)->len > 2) + if (RSTRING(pmode)->len == 0 || RSTRING(pmode)->len > 3) ArgError("illegal access mode");