Age | Commit message (Collapse) | Author |
---|
| https://.com/ruby/stringio/commit/ee3ee1df31 |
| (https://.com/ruby/stringio/pull/129) Companion PR to <https://.com/ruby/ruby/pull/7894>. https://.com/ruby/stringio/commit/2d3988e12f |
| |
| https://.com/ruby/stringio/commit/eb4ee49218 |
| |
| (https://.com/ruby/stringio/pull/117) We need to ensure shared buffers are made independent on mutation. Otherwise we could end up mutating unrelated string buffers. --------- https://.com/ruby/stringio/commit/5101cfb030 Co-authored-by: Aaron Patterson <[email protected]> Co-authored-by: Alan Wu <[email protected]> Co-authored-by: Aaron Patterson <[email protected]> Co-authored-by: Sutou Kouhei <[email protected]> |
| Notes: Merged: https://.com/ruby/ruby/pull/12469 |
| |
| When ungetting the string same as the same buffer string, extending the buffer can move the pointer in the argument. Reported by manun Manu (manun) at https://hackerone.com/reports/2805165. https://.com/ruby/stringio/commit/95c1194832 |
| https://.com/ruby/stringio/commit/ef03f9368d |
| https://.com/ruby/stringio/commit/a2aab4721c |
| In Ruby 2.7 and later, it is the same as `StringValue`. https://.com/ruby/stringio/commit/561ea67ea8 |
| https://.com/ruby/stringio/issues/81 |
| https://.com/ruby/stringio/commit/9ad5551160 |
| [Feature #20205] Followup: https://.com/ruby/stringio/pull/94 They no longer need to be special cases. If StringIO end up mutating a chilled string, a warning will be emitted. https://.com/ruby/stringio/commit/dc62d65449 |
| reads (https://.com/ruby/stringio/pull/95) [[Bug #20418]](https://bugs.ruby-lang.org/issues/20418) Ruby IO#read preserves the encoding on partial read, but change it when reading the whole IO from commit https://.com/ruby/ruby/commit/0ca7036682da: > * io.c (read_all): should associate default external encoding. > * io.c (io_read): should NOT associate default external encoding. https://.com/ruby/stringio/commit/073172da31 Co-authored-by: Jean Boussier <[email protected]> |
| https://.com/ruby/stringio/commit/0da5b725c8 |
| https://.com/ruby/stringio/commit/4e8e82fc30 |
| [Feature #20390] https://.com/ruby/stringio/commit/17ee957f34 Co-authored-by: Jean Boussier <[email protected]> |
| https://.com/ruby/stringio/commit/779f71359d |
| https://.com/ruby/stringio/commit/9cc1dfa19c |
| https://.com/ruby/stringio/commit/0205bd1c86 |
| (https://.com/ruby/stringio/pull/77) Followup of #79 `rb_str_resize()` was changed by https://.com/ruby/ruby/commit/b0b9f7201acab05c2a3ad92c3043a1f01df3e17f . ```c rb_str_resize(string, shorter) // clear ENC_CODERANGE in some case rb_str_resize(string, longer) // does not clear ENC_CODERANGE anymore ``` ```c // rb_str_resize in string.c if (slen > len && ENC_CODERANGE(str) != ENC_CODERANGE_7BIT) { ENC_CODERANGE_CLEAR(str); } ``` I think this change is based on an assumption that appending null bytes will not change flag `ascii_only?`. `strio_extend()` will make the string longer if needed, and update the flags correctly for appending null bytes. Before `memmove()`, we need to `rb_str_modify()` because updated flags are not updated for `memmove()`. https://.com/ruby/stringio/commit/b31a538576 |
| Fix https://bugs.ruby-lang.org/issues/20185 https://.com/ruby/stringio/commit/8230552a46 |
| This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548. |
| |
| https://.com/ruby/stringio/commit/75da93d48f |
| https://.com/ruby/stringio/commit/a2f8ef1a6a |
| (https://.com/ruby/stringio/pull/69) The conversion logic is borrowed from ruby/ruby's io.c: https://.com/ruby/ruby/blob/40391faeab608665da87a05c686c074f91a5a206/io.c#L4059-L4079 Fix ruby/stringio#68 Reported by IWAMOTO Kouichi. Thanks!!! https://.com/ruby/stringio/commit/4b170c1a68 |
| https://.com/ruby/stringio/commit/4400bf3380 |
| (https://.com/ruby/stringio/pull/67) Fix: https://.com/ruby/stringio/issues/66 If length is 0, IO#pread don't even try to read the IO, it simply return the buffer untouched if there is one or a new empty buffer otherwise. It also doesn't validate the offset when length is 0. cc @jdelStrother @kou https://.com/ruby/stringio/commit/37e9279337 Co-authored-by: Jean Boussier <[email protected]> |
| (https://.com/ruby/stringio/pull/65) https://.com/ruby/stringio/commit/e3ea087d04 |
| |
| Both for being closer to real IOs and also because it's a convenient API in multithreaded scenarios. Co-authored-by: Jean Boussier <[email protected]> |
| https://.com/ruby/stringio/commit/1587d3698e |
| (https://.com/ruby/stringio/pull/54) We will eventually want to refactor this, but for now this is compatible enough. |
| This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2. fix [Bug #19704] https://bugs.ruby-lang.org/issues/19704 This breaks compatibility for extension libraries. Such changes need a discussion. |
| * Add rb_io_path and rb_io_open_descriptor. * Use rb_io_open_descriptor to create PTY objects * Rename FMODE_PREP -> FMODE_EXTERNAL and expose it FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but FMODE_EXTERNAL is clearer about what the file descriptor represents and aligns with language in the IO::Buffer module. * Ensure that rb_io_open_descriptor closes the FD if it fails If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be responsible for closing your file, eventually, if you pass it to rb_io_open_descriptor, even if it raises an exception. * Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P * Expose `rb_io_closed_p`. * Add `rb_io_mode` to get IO mode. --------- Co-authored-by: KJ Tsanaktsidis <[email protected]> Notes: Merged-By: ioquatix <[email protected]> |
| (https://.com/ruby/stringio/pull/47) `rb_io_extract_modeenc` has been exported since ruby 2.7. |
| http://ci.rvm.jp/results/trunk-asserts@ruby-sp2-docker/4552803 ``` verify_internal_consistency_reachable_i: WB miss (O->Y) 0x00007f752ddd5550 [3LM ] strio (StringIO)strio -> 0x00007f752d19b7d0 [0 ] T_STRING (String) len: 8, capa: 15 "to_strio" <internal:/tmp/ruby/src/trunk-asserts/lib/rubygems/core_ext/kernel_require.rb>:53: [BUG] gc_verify_internal_consistency: found internal inconsistency. ``` https://.com/ruby/stringio/commit/2e8ab43cba |
| https://.com/ruby/stringio/commit/5d39880f70 |
| It only has a single reference set in 3 places which makes it fairly easy to implement. https://.com/ruby/stringio/commit/009896b973 |
| https://.com/ruby/stringio/commit/60bb320477 |
| https://.com/ruby/stringio/commit/a7561f447b |
| This reverts commit https://.com/ruby/stringio/commit/325933500b35. It is bumped to 3.0.5 in advance but not released yet. https://.com/ruby/stringio/commit/af67c36693 |
| https://.com/ruby/stringio/commit/325933500b |
| https://.com/ruby/stringio/commit/eb322a9716 |
| Notes: Merged: https://.com/ruby/ruby/pull/7025 |
| Notes: Merged: https://.com/ruby/ruby/pull/6890 |
| https://.com/ruby/stringio/commit/e62b9d78d3 |