summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2021-12-23[DOC] Enhanced RDoc for IO (#5324)Burdette Lamar
Treats #gets. Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-22[DOC] Enhanced RDoc for IO (#5321)Burdette Lamar
Treats: #readpartial #read Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-22Empty and return the buffer if zero size is given [Bug #18421]Nobuyoshi Nakada
In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`. Notes: Merged: https://github.com/ruby/ruby/pull/5323
2021-12-21Refactor setup_narg and extract finish_nargNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5020
2021-12-20[DOC] Enhanced RDoc for IO (#5307)Burdette Lamar
Treated: #sync #sync= #fsync #fdatasync #fileno #pid #inspect #to_io Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-19[DOC] Enhanced RDoc for IO (#5304)Burdette Lamar
Treated: ::try_convert #write #<< #flush #tell #seek #pos= #rewind #eof Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-19[DOC] Addition to IO introduction (#5299)Burdette Lamar
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-12-18Introduce io_result wrapper for passing `[-errno, size]` in VALUE.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5287 Merged-By: ioquatix <samuel@codeotaku.com>
2021-12-05Do not use `fcopyfile` if appending to non-empty file [Bug #18388]Nobuyoshi Nakada
`fcopyfile` appends `src` to `to` and then truncates `to` to it's original size.
2021-12-01[win32] Transcode input from console [Bug #18353]Nobuyoshi Nakada
On Windows, as the input from console is encoded in the active code page, convert the input to the internal encoding. Notes: Merged: https://github.com/ruby/ruby/pull/5196
2021-11-11Don't allow `fd == -1` to propagate to system calls.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5100
2021-11-10size_t is not for file sizeNobuyoshi Nakada
2021-11-10IO::Buffer for scheduler interface.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4621
2021-11-08[Feature #18290] Remove all usages of rb_gc_force_recyclePeter Zhu
This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult. Notes: Merged: https://github.com/ruby/ruby/pull/4363
2021-10-26Fix typoNobuyoshi Nakada
2021-10-25process.c: Add Process._fork (#5017)Yusuke Endoh
* process.c: Add Process._fork This API is supposed for application monitoring libraries to hook fork event. [Feature #17795] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged-By: mame <mame@ruby-lang.org>
2021-10-24EWOULDBLOCK is always defined since 74ba9c248890Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5015
2021-10-24Extract io_again_p to check if EAGAIN or EWOULDBLOCKNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5015
2021-10-24suppress warnings by parenthesizing unclear expressionsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5015
2021-10-07Reuse ractor stderrNobuyoshi Nakada
2021-10-07Adjust styles [ci skip]Nobuyoshi Nakada
2021-10-03Using NIL_P macro instead of `== Qnil`S.H
Notes: Merged: https://github.com/ruby/ruby/pull/4925 Merged-By: nobu <nobu@ruby-lang.org>
2021-09-23[DOC] Use `unpack1` instead of `unpack(template)[0]` [ci skip]Kazuhiro NISHIYAMA
2021-09-11Using RB_BIGNUM_TYPE_P macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4805
2021-08-22Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IOLars Kanis
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError. This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed. Fixes bug #18077 Notes: Merged: https://github.com/ruby/ruby/pull/4758
2021-08-16`popen()` is not available on emscriptenNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4745
2021-08-10Fix ARGF.read(length) short read [Bug #18074]Csaba Henk
Notes: Merged: https://github.com/ruby/ruby/pull/4727
2021-08-08Reduce chance to receive EBADF when closing an IO from another thread.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4717
2021-08-02Using RBOOL macroS.H
Notes: Merged: https://github.com/ruby/ruby/pull/4695 Merged-By: nobu <nobu@ruby-lang.org>
2021-08-01Define functions using rb_wait_for_single_fd [Bug #18046]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4696 Merged-By: nobu <nobu@ruby-lang.org>
2021-07-16io.c: Clarify the behavior of `IO.read` when called as `File.read`Yusuke Endoh
Ditto to `IO.binread`, `IO.write`, `IO.binwrite`, `IO.foreach`, and `IO.readlines`. Notes: Merged: https://github.com/ruby/ruby/pull/4579
2021-07-15process.c: Call rb_thread_atfork in rb_fork_rubyYusuke Endoh
All occurrences of rb_fork_ruby are followed by a call rb_thread_fork in the created child process. This is refactoring and a potential preparation for [Feature #17795]. (rb_fork_ruby may be wrapped by Process._fork_.)
2021-06-30[DOC] add notes and examples for pipe [ci skip]Nobuyoshi Nakada
2021-06-27Check if closed after each yield [Bug #17661]Nobuyoshi Nakada
2021-06-24Introduced RUBY_CRLF_ENVIRONMENT to simplify repeated conditionNobuyoshi Nakada
2021-06-22Rework `sysread` to use blocking `read_internal_locktmp`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4592
2021-06-22Deprecate and rework old (fd) centric functions.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4592
2021-06-22Direct io for accept, send, sendmsg, recvfrom, and related methods.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4477
2021-06-21What's Here for Numeric and ComparableBurdette Lamar
2021-06-17Adjust styles [ci skip]Nobuyoshi Nakada
* --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
2021-06-16Removed redundant NUM2IOCTLREQ definition [Bug #17759]Nobuyoshi Nakada
Fix up c2d9967f78d2e6f93f8d9876c2b3ab25aa6b86e7.
2021-06-16Configure ioctl request argument type [Bug #17759]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4576
2021-05-16Fix a typo [ci skip]Kazuhiro NISHIYAMA
2021-05-10Removed missing/dup2.cNobuyoshi Nakada
This function should be always available, as POSIX-compliant or Windows platform are required since 1.9. Also the code in this file is MT-unsafe. Notes: Merged: https://github.com/ruby/ruby/pull/4483
2021-05-04What's Here for class IO (#4440)Burdette Lamar
* What's Here for class IO Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2021-05-04Fix documentation for IO#unget{byte,c}Jeremy Evans
Fixes [Bug #14400]
2021-04-05[Doc] Drop signature around removed IO#codepointsKenichi Kamiya
Follow 43b95bafd57d04c8fb401d3a9b52aca3f5b4b0be Notes: Merged: https://github.com/ruby/ruby/pull/4320
2021-03-30Check errno before invoking scheduler in `rb_io_wait_readable/writable`.Samuel Williams
See <https://bugs.ruby-lang.org/issues/17527> for more details. Notes: Merged: https://github.com/ruby/ruby/pull/4338
2021-03-20Remove unneeded declarationsS.H
Notes: Merged: https://github.com/ruby/ruby/pull/4295 Merged-By: nobu <nobu@ruby-lang.org>
2021-02-09Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams
* Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking. Notes: Merged-By: ioquatix <samuel@codeotaku.com>