mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix comment: Buffer.for(string) without block returns readonly buffer
This commit is contained in:
parent
cb43540d53
commit
48ebd77e59
1 changed files with 16 additions and 18 deletions
|
@ -3572,10 +3572,7 @@ io_buffer_not_inplace(VALUE self)
|
|||
* \Buffer from string:
|
||||
*
|
||||
* string = 'data'
|
||||
* buffer = IO::Buffer.for(string)
|
||||
* # =>
|
||||
* # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
|
||||
* # ...
|
||||
* IO::Buffer.for(string) do |buffer|
|
||||
* buffer
|
||||
* # =>
|
||||
* # #<IO::Buffer 0x00007f3f02be9b18+4 SLICE>
|
||||
|
@ -3591,6 +3588,7 @@ io_buffer_not_inplace(VALUE self)
|
|||
* # 0x00000000 64 2d 2d 2d d---
|
||||
* string # original string changed, too
|
||||
* # => "d---"
|
||||
* end
|
||||
*
|
||||
* \Buffer from file:
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue