Fix comment: Buffer.for(string) without block returns readonly buffer

This commit is contained in:
TOMITA Masahiro 2024-05-19 20:21:15 +09:00 committed by Nobuyoshi Nakada
parent cb43540d53
commit 48ebd77e59

View File

@ -3572,10 +3572,7 @@ io_buffer_not_inplace(VALUE self)
* \Buffer from string: * \Buffer from string:
* *
* string = 'data' * string = 'data'
* buffer = IO::Buffer.for(string) * IO::Buffer.for(string) do |buffer|
* # =>
* # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
* # ...
* buffer * buffer
* # => * # =>
* # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE> * # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
@ -3591,6 +3588,7 @@ io_buffer_not_inplace(VALUE self)
* # 0x00000000 64 2d 2d 2d d--- * # 0x00000000 64 2d 2d 2d d---
* string # original string changed, too * string # original string changed, too
* # => "d---" * # => "d---"
* end
* *
* \Buffer from file: * \Buffer from file:
* *