From: "luislavena (Luis Lavena)" Date: 2012-05-27T00:37:02+09:00 Subject: [ruby-core:45264] [ruby-trunk - Bug #6500] File#open with a ':binmode => true' opt Issue #6500 has been updated by luislavena (Luis Lavena). Assignee changed from luislavena (Luis Lavena) to h.shirosaki (Hiroshi Shirosaki) Yusuke, assigning to Hiroshi Shirosaki who is more familiar with File IO. ---------------------------------------- Bug #6500: File#open with a ':binmode => true' opt https://bugs.ruby-lang.org/issues/6500#change-26844 Author: yimutang (Joey Zhou) Status: Assigned Priority: Normal Assignee: h.shirosaki (Hiroshi Shirosaki) Category: Target version: ruby -v: ruby 1.9.3p194 (2012-04-20) [i386-mingw32] Here's the problem, under Windows: irb(main):001:0> f = File.open('x',binmode:true) ArgumentError: both textmode and binmode specified from (irb):1:in `initialize' from (irb):1:in `open' from (irb):1 from D:/prog/Ruby/bin/irb:12:in `
' Under Windows, if File#open has a ':binmode => true' opt, and without a mode string, it will raise such exception. open('x','r',binmode:true) is OK Under Linux, there is no such problem, File.open('x',binmode:true) is ok -- http://bugs.ruby-lang.org/