summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2022-08-25Raise ArgumentError for IO.foreach with limit of 0Jeremy Evans
Makes behavior consistent with IO.readlines. Fixes [Bug #18767] Notes: Merged: https://github.com/ruby/ruby/pull/5954
2022-08-05[DOC] Mention Windows text mode EOF marker interpretationAlan Wu
I don't think this is super well known so it's worth mentioning as it can be a pitfall. See: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-170 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6212
2022-08-05[DOC] Clarify that `IO.read` uses text modeAlan Wu
See: https://bugs.ruby-lang.org/issues/18882#note-13 [Bug #18882] Notes: Merged: https://github.com/ruby/ruby/pull/6212
2022-07-28[DOC] Cross references for `ARGF`Nobuyoshi Nakada
2022-07-27Fix documentation for ARGF.inplace_mode{,=}Jeremy Evans
The value affects the name of the backup file created, not the name of the file modified (as the file is modified in place). Fixes [Bug #18920]
2022-07-27Adjust styles [ci skip]Nobuyoshi Nakada
2022-07-23[DOC] IO#eofKaíque Kandy Koga
Use IO#eof? instead of I#eof? Notes: Merged: https://github.com/ruby/ruby/pull/6172
2022-07-21Do not chomp trailing line separator IO#each with nil separator and chompJeremy Evans
nil separator means no sepator, so chomp should not remove a line separator. Partially Fixes [Bug #18770] Notes: Merged: https://github.com/ruby/ruby/pull/6164
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-07-21Revert "Do not chomp trailing line separator IO#each with nil separator and ↵Jeremy Evans
chomp" This reverts commit 04f86ad0b5d2fe4711ff300d855228a6aed55f33. This is causing CI issues, reverting for now.
2022-07-21Do not chomp trailing line separator IO#each with nil separator and chompJeremy Evans
nil separator means no sepator, so chomp should not remove a line separator. Partially Fixes [Bug #18770] Notes: Merged: https://github.com/ruby/ruby/pull/5959
2022-07-15[DOC] Fix documentation for ARGF#readlinesPeter Zhu
[Bug #18909] Notes: Merged: https://github.com/ruby/ruby/pull/6137
2022-07-14[DOC] Fix typo in documentation for IO#readlinesPeter Zhu
2022-07-07[Bug #18892] Reset `ARGF.lineno` after reading shebangNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6097
2022-07-06[Bug #18898] Fallback invalid external encoding to the defaultNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6093 Merged-By: nobu <nobu@ruby-lang.org>
2022-06-25Copy `IO#wait*` methods from `io-wait` gem to `io.c`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/6036
2022-06-20Allow to just warn as bool expected, without an exceptionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6039
2022-06-17Using is_ascii_string to check encodingS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5867
2022-06-13Handle case where write result is zero.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/6009
2022-06-09Stop ignoring 4th positional argument to IO.#{foreach,readlines}Jeremy Evans
Fixes [Bug #18771] Notes: Merged: https://github.com/ruby/ruby/pull/5953
2022-05-28Make `Kernel#p` completely uninterruptible.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Tidy up usage of write_lock.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Improve handling of zero length writes.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Improve consistency of `io_binwritev_internal` implementaiton.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Improve error handling in `finish_writeconv`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Better handling of `error`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Always allocate write_lockmachty
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Make `io_binwritev` atomic.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-28Make `io_binwrite` atomic.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5419
2022-05-25Fix out of bounds read.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5940
2022-05-20[DOC] Add a note to clarify binary flags to `IO.new`David Rodríguez
Try to make it more clear that the `File::BINARY` integer flag, and the `b` string suffix are not equivalent. Notes: Merged: https://github.com/ruby/ruby/pull/5923 Merged-By: nobu <nobu@ruby-lang.org>
2022-05-05Link from printf methods to format spec doc (#5886)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-04-25Fix ARGF#lineno to return Integer as documentedJean Boussier
[Bug #18753] Notes: Merged: https://github.com/ruby/ruby/pull/5841
2022-04-13[ci skip] Fix docsPeter Zhu
2022-04-08Fix some RDoc links (#5778)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-04-07[DOC] Fix linux kernel commit linksS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5768
2022-04-02[DOC] Enhanced RDoc for String (#5751)Burdette Lamar
Adds to doc for String.new, also making it compliant with documentation_guide.rdoc. Fixes some broken links in io.c (that I failed to correct yesterday). Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-04-02[DOC] Fix broken links to encodings.rdocNobuyoshi Nakada
Also prefers class name based references than file name based references.
2022-03-30Prefix ccan headers (#4568)Nobuyoshi Nakada
* Prefixed ccan headers * Remove unprefixed names in ccan/build_assert * Remove unprefixed names in ccan/check_type * Remove unprefixed names in ccan/container_of * Remove unprefixed names in ccan/list Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-03-25[DOC] Fix formatting for What's Here in IO (#5719)Burdette Lamar
* Fix formatting for What's Here in IO * Repair formatting in What's Heres in numeric.c * Fix formatting for What's Here in IO Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-03-01Close files in examples in io.c (#5615)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-25[DOC] Enhanced RDoc for some encoding methods (#5598)Burdette Lamar
In String, treats: #b #scrub #scrub! #unicode_normalize #unicode_normalize! #encode #encode! Also adds a note to IO.new (suggested by @jeremyevans). Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-18Enhanced RDoc for io.c (#5573)Burdette Lamar
Links to options doc added/improved; in particular, new links to new section "Encoding Options" in encoding.rdoc. Minor inconsistencies ironed out. Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-18Enhanced RDoc concerning command injection (#5537)Burdette Lamar
Clarifies security vulnerabilities for commands. Treats: Kernel.system Kernel.` (backtick) IO.popen IO.read IO.write IO.binread IO.binwrite IO.readlines IO.foreach Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-02-12[DOC] Simplify operator method referencesNobuyoshi Nakada
2022-02-07[DOC] Replace with IO@ModesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5530
2022-02-07[DOC] Remove extra periodPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5530
2022-02-07[DOC] Remove extra closing curly bracketPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5530
2022-02-07[DOC] Use RDoc link style for links in the same class/modulePeter Zhu
I used this regex: (?<=\[)#(?:class|module)-([A-Za-z]+)-label-([A-Za-z0-9\-\+]+) And performed a global find & replace for this: rdoc-ref:$1@$2 Notes: Merged: https://github.com/ruby/ruby/pull/5530
2022-02-07[DOC] Use RDoc link style for links to other classes/modulesPeter Zhu
I used this regex: ([A-Za-z]+)\.html#(?:class|module)-[A-Za-z]+-label-([A-Za-z0-9\-\+]+) And performed a global find & replace for this: rdoc-ref:$1@$2 Notes: Merged: https://github.com/ruby/ruby/pull/5530