Project

General

Profile

Actions

Bug #6500

closed

File#open with a ':binmode => true' opt

Added by yimutang (Joey Zhou) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20) [i386-mingw32]
Backport:
[ruby-core:45257]

Description

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


Related issues 1 (0 open1 closed)

Is duplicate of Backport193 - Backport #6055: IO.foreach 等で binmode:true を指定すると例外Closednaruse (Yui NARUSE)02/21/2012Actions

Updated by mame (Yusuke Endoh) almost 12 years ago

  • Status changed from Open to Assigned
  • Assignee set to luislavena (Luis Lavena)

Luis, could you treat this?

--
Yusuke Endoh

Updated by luislavena (Luis Lavena) almost 12 years ago

  • Assignee changed from luislavena (Luis Lavena) to h.shirosaki (Hiroshi Shirosaki)

Yusuke, assigning to Hiroshi Shirosaki who is more familiar with File IO.

Updated by h.shirosaki (Hiroshi Shirosaki) almost 12 years ago

  • Status changed from Assigned to Rejected

This issue is fixed at trunk. This seems a duplicate of Bug #6055.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0