diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2022-12-22 13:15:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-22 13:15:04 -0500 |
| commit | 98675ac09cf7bc204b708faea1874b0b0610f309 (patch) | |
| tree | 1e74425765efa10deeca2c32b68c8f29431c3d25 /array.c | |
| parent | bba2bfc97512014134ea1c172e7a077bddebdbad (diff) | |
[DOC] IO#read doesn't always read in binary mode
When `maxlen` is `nil`, it uses the data mode of the stream.
For example in the following:
```ruby
File.binwrite("a.txt", "\r\n\r")
p File.open("a.txt", "rt").read # "\n\n"
p File.open("a.txt", "rt").read(3) # "\r\n\r"
```
Note, this newline translation is _not_ specific to Windows.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6982
Merged-By: XrXr
Diffstat (limited to 'array.c')
0 files changed, 0 insertions, 0 deletions
