Project

General

Profile

Bug #5782

File.binwrite doc and hash argument

Added by marcandre (Marc-Andre Lafortune) over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
r34081
Backport:
[ruby-core:<unknown>]

Description

The doc for File.binwrite doesn't mention the possibility of a fourth argument (option hash), unlike File.write. Judging from the code, this looks like an oversight.

Can we get confirmation that it does accept a fourth parameter and that the doc should be updated?

I would personally simplify the rdoc to state that it File.binwrite does exactly the same as File.write except that it opens the file in binary mode.

Noticed by Konstantin Haase.

Thanks,

Marc-Andre

Associated revisions

Revision 605f4bae
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Revision 34967
Added by sorah (Sorah Fukumori) about 7 years ago

  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

History

Updated by marcandre (Marc-Andre Lafortune) over 7 years ago

For some reason, this bug report was never posted on the mailing list:

The doc for File.binwrite doesn't mention the possibility of a fourth argument (option hash), unlike File.write. Judging from the code, this looks like an oversight.

Can we get confirmation that it does accept a fourth parameter and that the doc should be updated?

I would personally simplify the rdoc to state that it File.binwrite does exactly the same as File.write except that it opens the file in binary mode.

Noticed by Konstantin Haase.

Thanks,

Marc-Andre

Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to sorah (Sorah Fukumori)
#3

Updated by sorah (Sorah Fukumori) about 7 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34967.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • io.c: fix rdoc of IO.binwrite to show same as IO.write except it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]

Also available in: Atom PDF