Applied in changeset commit:git|03a426ec8d30929558bf1244b4ad95eb7e1f54d2. ---------- [Feature #22279] Add region arguments to String bit operations (#18562) This patch extends the following String methods: * String#bit_set(offset, len...hasumikin (hitoshi hasumi)
* [Feature #22279] Region (Length / Range) Arguments for String Bit Operations (hasumikin) * Follow-up to [Feature #22118] (String bit operations, accepted): adds `(offset, length)` and Range overloads to `bit_set` / `bit_clear`...hasumikin (hitoshi hasumi)
PR URL: https://github.com/ruby/ruby/pull/18562 ## What this adds Region overloads for the methods introduced in #22118, so they act on a contiguous run of bits in a single call: ``` String#bit_set(offset, length, lsb_first: tr...hasumikin (hitoshi hasumi)
Applied in changeset commit:git|2461caebba1d47ca79cfd4e0a825e6df40f375bd. ---------- [Feature #22118] Introduce Basic Bit Operations into String (#17353) This patch adds the following methods to String class: * String#bit_get(offset, ...hasumikin (hitoshi hasumi)
- [Feature #22118] Introduce Basic Bit Operations into String (hasumikin) - https://bugs.ruby-lang.org/issues/22118#note-6 - Is it OK to have a *temporary* asymmetry where `String#bit_count` doesn't take a bit-order keyword? ...hasumikin (hitoshi hasumi)
I turned the PR ready to review: https://github.com/ruby/ruby/pull/17353 If the requirement written in the current description (and the reconfirmation in #note-6) is just enough, I believe it can go forwardhasumikin (hitoshi hasumi)
#note-7 I do not oppose `bit_put` itself, but my future plan includes introducing a range parameter like: ```ruby data.bit_set(3..19) ``` In the above, you can assume that the `data` is a header managing some resource or a serial ...hasumikin (hitoshi hasumi)