spec
spec copied to clipboard
Add specs for all of IO::Buffer constructors
Continuing from #1297
More weird stuff:
-
.map:- Specifying non-0
offsetguarantees that everything breaks: size is computed incorrectly, crashing VM on reading the whole buffer, on macOS even a bounded read crashes VM, on Windows valid sizes are ???- https://bugs.ruby-lang.org/issues/21700
- https://github.com/ruby/ruby/pull/15264
- Specifying non-0
-
.new:- Passing LOCKED flag is intended? There is a test for that. But this seems like a bad idea to me, as it's not
freeable (GC can still free it, though, I think).
- Passing LOCKED flag is intended? There is a test for that. But this seems like a bad idea to me, as it's not
@ioquatix Could you review this maybe?
@ioquatix Could you review this maybe?
This is still a very early draft, but that offset parameter made me create an issue and a PR to ruby directly, so, yeah :face_holding_back_tears: Reviewing the PR with fixes for the method is probably more useful currently.
LGTM in general