8000 IO::Buffer improvements and documentation. by ioquatix · Pull Request #9329 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

IO::Buffer improvements and documentation. #9329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 24, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cbf2dc1
Restore experimental warnings.
ioquatix Dec 23, 2023
a750ed0
Documentation and code structure improvements.
ioquatix Dec 23, 2023
a14f488
More documentation.
ioquatix Dec 23, 2023
dfffa4f
Avoid %z format specifier.
ioquatix Dec 23, 2023
bd5663a
Improved validation of flags, clarified documentation of argument han…
ioquatix Dec 23, 2023
a7fb502
Add documentation for constants.
ioquatix Dec 23, 2023
fc94ef9
Extended documentation around predicates and fixed private mappings.
ioquatix Dec 23, 2023
759b3c2
Improve documentation for transfer.
ioquatix Dec 24, 2023
dc053c5
Add documentation for hexdump and fix output string size computation.
ioquatix Dec 24, 2023
b82d359
Rather than raising an error, ignore unknown flags.
ioquatix Dec 24, 2023
ed03ab5
Remove inconsistent use of `Example:` and add example to `null?`.
ioquatix Dec 24, 2023
444a7d6
Add note about RUBY_IO_BUFFER_DEFAULT_SIZE.
ioquatix Dec 24, 2023
2e6ad3c
Add simple test for private mapped files.
ioquatix Dec 24, 2023
e4d92e6
Expose `private?`.
ioquatix Dec 24, 2023
d33a648
Add note about flags masking.
ioquatix Dec 24, 2023
2609786
Windows may require read/write file descriptor?
ioquatix Dec 24, 2023
2c93488
Let's hide this for now.
ioquatix Dec 24, 2023
2a0e24a
Use a real file for the test.
ioquatix Dec 24, 2023
9e198ec
Ensure the buffer is freed (unmapped) before unlinking the tempfile.
ioquatix Dec 24, 2023
1a64f08
Fix private mapping on Windows.
ioquatix Dec 24, 2023
da01d4b
Maybe this will work??? Windows please?
ioquatix Dec 24, 2023
de1a324
Omit private mapped buffer test on Windows.
ioquatix Dec 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add simple test for private mapped files.
  • Loading branch information
ioquatix committed Dec 24, 2023
commit 2e6ad3c2cbeaae62f663d2cd4ae0367426e00977
6 changes: 6 additions & 0 deletions test/ruby/test_io_buffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,10 @@ def test_shared
rescue NotImplementedError
omit "Fork/shared memory is not supported."
end

def test_private
buffer = IO::Buffer.map(File.open(__FILE__), nil, 0, IO::Buffer::PRIVATE)
assert buffer.private?
refute buffer.readonly?
end
end
0