Actions
Bug #5918
closedIO.new accepts some conflicting binmode specifiers
Bug #5918:
IO.new accepts some conflicting binmode specifiers
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
Description
=begin
Accepted: "wb" + :binmode => false
Accepted: "wt" + :textmode => false
These should not be accepted because they are clearly conflicting.
In fact, I would argue that any combination of mode specifier in both the mode string and options should raise ArgumentError (conflicting or not), to match the behavior when encoding specifiers in both the mode string and options:
IO.new(0, 'w:ISO-8859-1', :encoding => 'ISO-8859-1') #=> ArgumentError: encoding specified twice
=end
Actions