[#111472] [Ruby master Bug#19274] Error installing ruby 3.2.0 on RH 8 — "aalllop (Alberto Allegue) via ruby-core" <ruby-core@...>
Issue #19274 has been reported by aalllop (Alberto Allegue).
5 messages
2022/12/28
[#111508] Data support for versions before 3.2.0 — Eustáquio Rangel via ruby-core <ruby-core@...>
I was wondering that every piece of code (gems, etc) that use the new Data =
3 messages
2022/12/29
[ruby-core:111397] [Ruby master Bug#19252] IO::Buffer.pread last argument is always ignored?
From:
"ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>
Date:
2022-12-23 11:52:04 UTC
List:
ruby-core #111397
Issue #19252 has been updated by ioquatix (Samuel Williams).
It looks like the base pointer is not computed correctly, let me check and fix it.
----------------------------------------
Bug #19252: IO::Buffer.pread last argument is always ignored?
https://bugs.ruby-lang.org/issues/19252#change-100771
* Author: zverok (Victor Shepelev)
* Status: Open
* Priority: Normal
* Assignee: ioquatix (Samuel Williams)
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
I am trying to document new `IO::Buffer#pread` and `#pwrite` methods.
According to what I can guess from code and tests, this code:
```ruby
IO::Buffer.for('teststring') do |buffer|
buffer.pread(File.open('/dev/urandom', 'rb'), 0, 2, 3)
p buffer.get_string
end
```
...is expected to read **2** chars from `/dev/urandom`, starting from **0**th char, and write it to buffer starting from its **3**rd byte.
Actual output:
```
"F\x94ststring"
```
E.g. two first chars of the buffer are replaced.
Am I missing something, or is it a legitimate bug?..
UPD: Seems the same for `pwrite`:
```ruby
IO::Buffer.for('1234567').pwrite(File.open('tmp/buf.txt', 'wb'), 0, 2, 3) # expected to write "45" to file
`cat tmp/buf.txt`
# => "12"
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/