[#109095] [Ruby master Misc#18888] Migrate ruby-lang.org mail services to Google Domains and Google Workspace — "shugo (Shugo Maeda)" <noreply@...>
Issue #18888 has been reported by shugo (Shugo Maeda).
16 messages
2022/06/30
[ruby-core:109094] [Ruby master Bug#18881] IO#read_nonblock raises IOError when called following buffered character IO
From:
"javanthropus (Jeremy Bopp)" <noreply@...>
Date:
2022-06-29 12:26:37 UTC
List:
ruby-core #109094
Issue #18881 has been updated by javanthropus (Jeremy Bopp).
There needs to be documentation to cover the corner cases no matter what. Wouldn't it be better to document the current behavior rather than add artificial limitations?
----------------------------------------
Bug #18881: IO#read_nonblock raises IOError when called following buffered character IO
https://bugs.ruby-lang.org/issues/18881#change-98241
* Author: javanthropus (Jeremy Bopp)
* Status: Rejected
* Priority: Normal
* ruby -v: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The following example code works as expected on Linux but raises an `IOError` on Windows:
``` ruby
r, w = IO.pipe
w.write("foobar")
c = r.getc
r.ungetc(c)
r.read_nonblock(3)
```
The error message is:
```
IOError: byte oriented read for character buffered IO
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>