summaryrefslogtreecommitdiff
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* [DOC] Enhanced RDoc for String (#5751)Burdette Lamar2022-04-021-11/+11
| | | | | | 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).
* [DOC] Fix broken links to encodings.rdocNobuyoshi Nakada2022-04-021-11/+11
| | | | | Also prefers class name based references than file name based references.
* Prefix ccan headers (#4568)Nobuyoshi Nakada2022-03-301-5/+5
| | | | | | | | | | | | | * 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>
* [DOC] Fix formatting for What's Here in IO (#5719)Burdette Lamar2022-03-251-99/+99
| | | | | | | * 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
* Close files in examples in io.c (#5615)Burdette Lamar2022-03-011-0/+65
|
* [DOC] Enhanced RDoc for some encoding methods (#5598)Burdette Lamar2022-02-251-0/+7
| | | | | | | | | | | | | | In String, treats: #b #scrub #scrub! #unicode_normalize #unicode_normalize! #encode #encode! Also adds a note to IO.new (suggested by @jeremyevans).
* Enhanced RDoc for io.c (#5573)Burdette Lamar2022-02-181-61/+81
| | | | | Links to options doc added/improved; in particular, new links to new section "Encoding Options" in encoding.rdoc. Minor inconsistencies ironed out.
* Enhanced RDoc concerning command injection (#5537)Burdette Lamar2022-02-181-25/+46
| | | | | | | | | | | | | | | | Clarifies security vulnerabilities for commands. Treats: Kernel.system Kernel.` (backtick) IO.popen IO.read IO.write IO.binread IO.binwrite IO.readlines IO.foreach
* [DOC] Simplify operator method referencesNobuyoshi Nakada2022-02-121-1/+1
|
* [DOC] Replace with IO@ModesPeter Zhu2022-02-071-5/+5
|
* [DOC] Remove extra periodPeter Zhu2022-02-071-1/+1
|
* [DOC] Remove extra closing curly bracketPeter Zhu2022-02-071-1/+1
|
* [DOC] Use RDoc link style for links in the same class/modulePeter Zhu2022-02-071-63/+63
| | | | | | | | | | 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
* [DOC] Use RDoc link style for links to other classes/modulesPeter Zhu2022-02-071-7/+7
| | | | | | | | | | 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
* [DOC] Fix links in documentation for File and IOPeter Zhu2022-02-071-4/+4
| | | | Fixes some typos and dead links.
* {DOC] Enhanced RDoc for io.c (#5529)Burdette Lamar2022-02-051-25/+30
| | | Changes parameter name from simple opts to open_opts or enc_opts when appropriate; leaves the name unchanged when more than one kind of option is allowed.
* [DOC] Enhanced RDoc for io.c (#5527)Burdette Lamar2022-02-041-129/+115
| | | | | | | | | | | | Treats: IO.binread (abbreviated to be like IO.binwrite). IO.write IO.binwrite IO.copystream IO#external_encoding IO#internal_encoding IO#set_encoding
* [DOC] Enhanced RDoc for io.c (#5511)Burdette Lamar2022-02-041-97/+206
| | | | | | | | | Treats: IO.foreach IO.readlines IO.read IO.binread
* [DOC] Enhanced RDoc for io.c (#5460)Burdette Lamar2022-01-301-245/+274
| | | | | | | | | | | | | | Treats: Kernel#readline Kernel#readlines Kernel#`cmd` IO#advise IO.select IO#ioctl IO#fcntl Kernel#syscall IO.pipe
* [wasm] wasm/missing.{c,h}: add missing libc stubs for wasi-libcYuta Saito2022-01-191-0/+1
|
* [DOC] Enhanced RDoc for io.c (#5451)Burdette Lamar2022-01-181-212/+181
| | | | | | | | | | | | | | Treats: IO#reopen IO#printf Kernel#printf IO#print Kernel#print IO#putc IO.new IO#set_encoding_by_bom IO.for_fd
* Tweak IO documentation for `IO.write('|cmd')` and so on [ci skip]Masataka Pocke Kuwabara2022-01-171-4/+4
|
* Enhanced RDoc for io.c (#5444)Burdette Lamar2022-01-141-121/+150
| | | | | | | | | | | | Treated: IO#open IO#sysopen #open IO#putc IO#puts #p Kernel#display
* File rdoc (#5438)Burdette Lamar2022-01-131-28/+33
| | | | | | | | Treats: File introduction File.open File.new
* Enhanced RDoc for IO.popen (#5430)Burdette Lamar2022-01-121-49/+115
| | | * Enhanced RDoc for IO.popen
* Enhanced RDoc for IO (#5425)Burdette Lamar2022-01-101-40/+51
| | | | | | | | | Treats: #pread #pwrite #binmode #binmode?
* Enhanced RDoc for IO (#5424)Burdette Lamar2022-01-101-26/+20
| | | | | | | | Treats: #sysseek #syswrite #sysread
* [DOC] Enhanced RDoc for IO (#5422)Burdette Lamar2022-01-101-120/+81
| | | | | | | | | | | | Revises much of the introductory material. Also treats: #close_on_exec #close #closed? #close_read #close_write
* Move IO write buffer allocation into function.Samuel Williams2022-01-091-99/+119
|
* Enhanced RDoc for IO (#5402)Burdette Lamar2022-01-061-36/+43
| | | | | | | | Treats: #ungetc #isatty #close_on_exec?
* Enhanced RDoc for IO (#5395)Burdette Lamar2022-01-051-46/+65
| | | | | | | | | | Treats: #getc #readchar #getbyte #readbyte #ungetbyte
* Enhanced RDoc for IO (#5381)Burdette Lamar2022-01-041-100/+208
| | | | | | | | | | | | | Treats: #lineno #lineno= #readline #readlines #each_line #each_byte #each_char #each_codepoint
* Negative RBOOL usageNobuyoshi Nakada2022-01-011-1/+1
|
* Fix incorrect minimum read length. (#5353)Samuel Williams2022-01-011-6/+2
|
* Enhanced RDoc for IO (#5367)Burdette Lamar2021-12-301-75/+154
| | | | | | | | | | | | | | | | | Adds sections to class RDoc: Lines Line Separator Line Limit Line Number Revises example text file t.txt to: Include paragraphs (separated by double line separator). Avoid being too long. Revises examples that use the changed example file. There are several other methods that will point to the added sections.
* `ioctl_narg_len` is used only when ioctl(2) is availableNobuyoshi Nakada2021-12-291-0/+2
|
* Prefer to use RTEST when checking result of `rb_io_wait`. (#5341)Samuel Williams2021-12-251-1/+1
| | | | | * Prefer to use RTEST when checking result of `rb_io_wait`. * Consistently use false for signifying no events ready.
* Adjust styles [ci skip]Nobuyoshi Nakada2021-12-241-3/+6
|
* Improvements to `rb_io_wait` return value handling and internal ↵Samuel Williams2021-12-241-8/+19
| | | | implementation. (#5340)
* [DOC] Enhanced RDoc for IO (#5324)Burdette Lamar2021-12-231-24/+76
| | | Treats #gets.
* [DOC] Enhanced RDoc for IO (#5321)Burdette Lamar2021-12-221-97/+125
| | | | | | | Treats: #readpartial #read
* Empty and return the buffer if zero size is given [Bug #18421]Nobuyoshi Nakada2021-12-221-2/+6
| | | | In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`.
* Refactor setup_narg and extract finish_nargNobuyoshi Nakada2021-12-211-32/+27
|
* [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
|