summaryrefslogtreecommitdiff
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* [DOC] Enhanced RDoc for IO (#5307)Burdette Lamar2021-12-201-49/+77
| | | | | | | | | | | | | Treated: #sync #sync= #fsync #fdatasync #fileno #pid #inspect #to_io
* [DOC] Enhanced RDoc for IO (#5304)Burdette Lamar2021-12-191-94/+136
| | | | | | | | | | | | | | Treated: ::try_convert #write #<< #flush #tell #seek #pos= #rewind #eof
* [DOC] Addition to IO introduction (#5299)Burdette Lamar2021-12-191-0/+253
| | | Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Introduce io_result wrapper for passing `[-errno, size]` in VALUE.Samuel Williams2021-12-181-65/+56
|
* Do not use `fcopyfile` if appending to non-empty file [Bug #18388]Nobuyoshi Nakada2021-12-051-0/+7
| | | | | `fcopyfile` appends `src` to `to` and then truncates `to` to it's original size.
* [win32] Transcode input from console [Bug #18353]Nobuyoshi Nakada2021-12-011-0/+12
| | | | | On Windows, as the input from console is encoded in the active code page, convert the input to the internal encoding.
* Don't allow `fd == -1` to propagate to system calls.Samuel Williams2021-11-111-4/+10
|
* size_t is not for file sizeNobuyoshi Nakada2021-11-101-2/+4
|
* IO::Buffer for scheduler interface.Samuel Williams2021-11-101-157/+201
|
* [Feature #18290] Remove all usages of rb_gc_force_recyclePeter Zhu2021-11-081-1/+1
| | | | | This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult.
* Fix typoNobuyoshi Nakada2021-10-261-5/+5
|
* process.c: Add Process._fork (#5017)Yusuke Endoh2021-10-251-1/+1
| | | | | | | | | | * 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>
* EWOULDBLOCK is always defined since 74ba9c248890Nobuyoshi Nakada2021-10-241-7/+7
|
* Extract io_again_p to check if EAGAIN or EWOULDBLOCKNobuyoshi Nakada2021-10-241-6/+12
|
* suppress warnings by parenthesizing unclear expressionsNobuyoshi Nakada2021-10-241-4/+4
|
* Reuse ractor stderrNobuyoshi Nakada2021-10-071-7/+9
|
* Adjust styles [ci skip]Nobuyoshi Nakada2021-10-071-5/+8
|
* Using NIL_P macro instead of `== Qnil`S.H2021-10-031-1/+1
|
* [DOC] Use `unpack1` instead of `unpack(template)[0]` [ci skip]Kazuhiro NISHIYAMA2021-09-231-1/+1
|
* Using RB_BIGNUM_TYPE_P macroS-H-GAMELINKS2021-09-111-1/+1
|
* Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IOLars Kanis2021-08-221-4/+2
| | | | | | | 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
* `popen()` is not available on emscriptenNobuyoshi Nakada2021-08-161-1/+5
|
* Fix ARGF.read(length) short read [Bug #18074]Csaba Henk2021-08-101-2/+1
|
* Reduce chance to receive EBADF when closing an IO from another thread.Samuel Williams2021-08-081-19/+27
|
* Using RBOOL macroS.H2021-08-021-12/+7
|
* Define functions using rb_wait_for_single_fd [Bug #18046]Nobuyoshi Nakada2021-08-011-0/+12
|
* io.c: Clarify the behavior of `IO.read` when called as `File.read`Yusuke Endoh2021-07-161-17/+59
| | | | | Ditto to `IO.binread`, `IO.write`, `IO.binwrite`, `IO.foreach`, and `IO.readlines`.
* process.c: Call rb_thread_atfork in rb_fork_rubyYusuke Endoh2021-07-151-1/+0
| | | | | | | | 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_.)
* [DOC] add notes and examples for pipe [ci skip]Nobuyoshi Nakada2021-06-301-7/+19
|
* Check if closed after each yield [Bug #17661]Nobuyoshi Nakada2021-06-271-1/+3
|
* Introduced RUBY_CRLF_ENVIRONMENT to simplify repeated conditionNobuyoshi Nakada2021-06-241-8/+14
|
* Rework `sysread` to use blocking `read_internal_locktmp`.Samuel Williams2021-06-221-12/+6
|
* Deprecate and rework old (fd) centric functions.Samuel Williams2021-06-221-34/+48
|
* Direct io for accept, send, sendmsg, recvfrom, and related methods.Samuel Williams2021-06-221-0/+36
|
* What's Here for Numeric and ComparableBurdette Lamar2021-06-211-2/+5
|
* Adjust styles [ci skip]Nobuyoshi Nakada2021-06-171-3/+6
| | | | | | | | | * --braces-after-func-def-line * --dont-cuddle-else * --procnames-start-lines * --space-after-for * --space-after-if * --space-after-while
* Removed redundant NUM2IOCTLREQ definition [Bug #17759]Nobuyoshi Nakada2021-06-161-1/+0
| | | | Fix up c2d9967f78d2e6f93f8d9876c2b3ab25aa6b86e7.
* Configure ioctl request argument type [Bug #17759]Nobuyoshi Nakada2021-06-161-2/+2
|
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2021-05-161-1/+1
|
* Removed missing/dup2.cNobuyoshi Nakada2021-05-101-3/+1
| | | | | | 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.
* What's Here for class IO (#4440)Burdette Lamar2021-05-041-0/+149
| | | | * What's Here for class IO
* Fix documentation for IO#unget{byte,c}Jeremy Evans2021-05-041-9/+44
| | | | Fixes [Bug #14400]
* [Doc] Drop signature around removed IO#codepointsKenichi Kamiya2021-04-051-2/+0
| | | | Follow 43b95bafd57d04c8fb401d3a9b52aca3f5b4b0be
* Check errno before invoking scheduler in `rb_io_wait_readable/writable`.Samuel Williams2021-03-301-31/+35
| | | | See <https://bugs.ruby-lang.org/issues/17527> for more details.
* Remove unneeded declarationsS.H2021-03-201-1/+0
|
* Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams2021-02-091-29/+33
| | | | | | | | | * 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.
* Forward keyword arguments to ARGF from global functionsNobuyoshi Nakada2021-02-081-12/+19
|
* io.c: popen is not available on emscriptenYusuke Endoh2021-01-231-0/+9
|
* [DOC] Fix grammar: "is same as" -> "is the same as"Marcus Stollsteimer2021-01-051-1/+1
|
* Made an internal callback function staticNobuyoshi Nakada2020-12-201-1/+1
|