Skip to content

Commit 10a6821

Browse files
tmtmhsbt
authored andcommitted
[DOC] Fix IO::Buffer document
1 parent 6e2bf5d commit 10a6821

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

io_buffer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ io_buffer_for_yield_instance_ensure(VALUE _arguments)
571571
* buffer.get_string(0, 1)
572572
* # => "t"
573573
* string
574-
* # => "best"
574+
* # => "test"
575575
*
576576
* buffer.resize(100)
577577
* # in `resize': Cannot resize external buffer! (IO::Buffer::AccessError)
@@ -3784,9 +3784,9 @@ io_buffer_not_inplace(VALUE self)
37843784
*
37853785
* File.write('test.txt', 'test data')
37863786
* # => 9
3787-
* buffer = IO::Buffer.map(File.open('test.txt'))
3787+
* buffer = IO::Buffer.map(File.open('test.txt'), nil, 0, IO::Buffer::READONLY)
37883788
* # =>
3789-
* # #<IO::Buffer 0x00007f3f0768c000+9 MAPPED IMMUTABLE>
3789+
* # #<IO::Buffer 0x00007f3f0768c000+9 EXTERNAL MAPPED FILE SHARED READONLY>
37903790
* # ...
37913791
* buffer.get_string(5, 2) # read 2 bytes, starting from offset 5
37923792
* # => "da"

0 commit comments

Comments
 (0)