[#106355] [Ruby master Bug#18373] RBS build failure: '/include/x86_64-linux/ruby/config.h', needed by 'constants.o'. — "vo.x (Vit Ondruch)" <noreply@...>
Issue #18373 has been reported by vo.x (Vit Ondruch).
28 messages
2021/12/01
[ruby-core:106932] [Ruby master Bug#18421] `IO#readpartial` and `IO#read_nonblock` return non-empty string on empty file
From:
"usa (Usaku NAKAMURA)" <noreply@...>
Date:
2021-12-31 10:33:35 UTC
List:
ruby-core #106932
Issue #18421 has been updated by usa (Usaku NAKAMURA).
Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: REQUIRED, 2.7: DONE, 3.0: REQUIRED
ruby_2_7 c4a5eaf37b9bf87f8324a7070c8dbc597b89c4fc merged revision(s) fdf39963490cf2cf95b30d91bb9b35964c2c2350.
----------------------------------------
Bug #18421: `IO#readpartial` and `IO#read_nonblock` return non-empty string on empty file
https://bugs.ruby-lang.org/issues/18421#change-95753
* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Priority: Normal
* Backport: 2.6: REQUIRED, 2.7: DONE, 3.0: REQUIRED
----------------------------------------
With an empty file `empty_file`, this seems indisputably correct.
```ruby
File.open("empty_file") {|f| f.read(0, "abc")} #=> ""
```
OTOH, obviously these seem bugs.
```ruby
File.open("empty_file") {|f|f.readpartial(0, "abc")} #=> "abc"
File.open("empty_file") {|f|f.read_nonblock(0, "abc")} #=> "abc"
```
https://github.com/ruby/ruby/pull/5323
--
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>