aboutsummaryrefslogtreecommitdiffstats
path: root/ext/stringio
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/stringio] Extract `readonly_string_p`Nobuyoshi Nakada2024-03-271-2/+8
| | | | https://github.com/ruby/stringio/commit/0da5b725c8
* [ruby/stringio] Adjust styles [ci skip]Nobuyoshi Nakada2024-03-281-54/+54
| | | | https://github.com/ruby/stringio/commit/4e8e82fc30
* [ruby/stringio] Eagerly defrost chilled stringsÉtienne Barrié2024-03-281-4/+20
| | | | | | | | [Feature #20390] https://github.com/ruby/stringio/commit/17ee957f34 Co-authored-by: Jean Boussier <byroot@ruby-lang.org>
* [ruby/stringio] NULL StringIO by `StringIO.new(nil)`Nobuyoshi Nakada2024-03-151-14/+25
| | | | https://github.com/ruby/stringio/commit/779f71359d
* [ruby/stringio] [DOC] Package rdoc filesNobuyoshi Nakada2024-03-141-0/+6
| | | | https://github.com/ruby/stringio/commit/8522c90e4b
* [ruby/stringio] [DOC] Add missing documentsNobuyoshi Nakada2024-03-141-0/+16
| | | | https://github.com/ruby/stringio/commit/9cc1dfa19c
* [ruby/stringio] [DOC] Add rdoc taskNobuyoshi Nakada2024-03-141-0/+1
| | | | https://github.com/ruby/stringio/commit/5dd52d4aec
* [ruby/stringio] Define `StringIO::MAX_LENGTH`Nobuyoshi Nakada2024-03-131-0/+4
| | | | https://github.com/ruby/stringio/commit/0205bd1c86
* [ruby/stringio] Fix ascii_only? flag in strio_writetomoya ishida2024-01-181-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/77) Followup of #79 `rb_str_resize()` was changed by https://github.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://github.com/ruby/stringio/commit/b31a538576
* [ruby/stringio] Update the coderange after overwriteNobuyoshi Nakada2024-01-161-0/+6
| | | | | | Fix https://bugs.ruby-lang.org/issues/20185 https://github.com/ruby/stringio/commit/8230552a46
* Revert "Rollback to released version numbers of stringio and strscan"Hiroshi SHIBATA2023-12-251-1/+1
| | | | This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548.
* Rollback to released version numbers of stringio and strscanHiroshi SHIBATA2023-12-161-1/+1
|
* [ruby/stringio] Development of 3.1.1 started.Sutou Kouhei2023-11-281-1/+1
| | | | https://github.com/ruby/stringio/commit/75da93d48f
* [ruby/stringio] Do not compile the C extension on TruffleRubyBenoit Daloze2023-11-271-1/+5
| | | | | | | | | | | * Before this it was compiled but not used, because TruffleRuby has a stringio.rb in stdlib and .rb has precedence over .so. In fact that extension never worked on TruffleRuby, because rb_io_extract_modeenc() has never been defined on TruffleRuby. * So this just skip compiling the extension since compilation of it now fails: https://github.com/ruby/openssl/issues/699 https://github.com/ruby/stringio/commit/d791b63df6
* [ruby/stringio] Development of 3.1.0 started.Sutou Kouhei2023-11-081-1/+1
| | | | https://github.com/ruby/stringio/commit/a2f8ef1a6a
* [ruby/stringio] Add missing row separator encoding conversionSutou Kouhei2023-11-081-22/+41
| | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/69) The conversion logic is borrowed from ruby/ruby's io.c: https://github.com/ruby/ruby/blob/40391faeab608665da87a05c686c074f91a5a206/io.c#L4059-L4079 Fix ruby/stringio#68 Reported by IWAMOTO Kouichi. Thanks!!! https://github.com/ruby/stringio/commit/4b170c1a68
* [ruby/stringio] Make STRINGIO_VERSION uniformNobuyoshi Nakada2023-11-042-2/+3
| | | | https://github.com/ruby/stringio/commit/4400bf3380
* [ruby/stringio] Move Java version to Java directoryNobuyoshi Nakada2023-11-041-1/+2
| | | | https://github.com/ruby/stringio/commit/3f90a0d619
* [ruby/stringio] StringIO#pread: handle 0 length like IO#preadJean byroot Boussier2023-10-051-0/+7
| | | | | | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/67) Fix: https://github.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://github.com/ruby/stringio/commit/37e9279337 Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
* [ruby/stringio] [DOC] Fix linkBurdette Lamar2023-09-221-1/+1
| | | | | | (https://github.com/ruby/stringio/pull/65) https://github.com/ruby/stringio/commit/e3ea087d04
* Development of 3.0.9 started.Sutou Kouhei2023-08-291-1/+1
|
* Implement StringIO#pread (#56)Jean byroot Boussier2023-08-021-0/+43
| | | | | | | Both for being closer to real IOs and also because it's a convenient API in multithreaded scenarios. Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
* [ruby/stringio] Development of 3.0.8 started.Hiroshi SHIBATA2023-06-021-1/+1
| | | | https://github.com/ruby/stringio/commit/1587d3698e
* [ruby/stringio] Avoid direct struct usage.Samuel Williams2023-06-011-2/+2
| | | | | | | (https://github.com/ruby/stringio/pull/54) We will eventually want to refactor this, but for now this is compatible enough.
* Revert "Hide most of the implementation of `struct rb_io`. (#6511)"NARUSE, Yui2023-06-011-2/+2
| | | | | | | | | 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.
* Hide most of the implementation of `struct rb_io`. (#6511)Samuel Williams2023-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <ktsanaktsidis@zendesk.com>
* [ruby/stringio] Drop support for ruby 2.6 or earlierNobuyoshi Nakada2023-05-083-83/+1
| | | | | | (https://github.com/ruby/stringio/pull/47) `rb_io_extract_modeenc` has been exported since ruby 2.7.
* [ruby/stringio] Update write-barrier at copyingNobuyoshi Nakada2023-05-031-3/+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://github.com/ruby/stringio/commit/2e8ab43cba
* [ruby/stringio] Development of 3.0.7 started.Sutou Kouhei2023-04-141-1/+1
| | | | https://github.com/ruby/stringio/commit/5d39880f70
* Update the depend filesMatt Valentine-House2023-02-281-1/+0
|
* [ruby/stringio] Implement write barrier on StringIOJean Boussier2023-02-281-4/+5
| | | | | | | It only has a single reference set in 3 places which makes it fairly easy to implement. https://github.com/ruby/stringio/commit/009896b973
* Remove intern/gc.h from Make depsMatt Valentine-House2023-02-271-1/+0
|
* [ruby/stringio] Remove (newly unneeded) remarks about aliasesBurdetteLamar2023-02-251-6/+0
| | | | https://github.com/ruby/stringio/commit/60bb320477
* Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada2023-02-081-0/+1
| | | | | | | | | Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
* [ruby/stringio] Development of 3.0.6 started.Nobuyoshi Nakada2023-02-031-1/+1
| | | | https://github.com/ruby/stringio/commit/a7561f447b
* [ruby/stringio] Revert "bump up to 3.0.6" [ci skip]Nobuyoshi Nakada2023-02-021-1/+1
| | | | | | | This reverts commit https://github.com/ruby/stringio/commit/325933500b35. It is bumped to 3.0.5 in advance but not released yet. https://github.com/ruby/stringio/commit/af67c36693
* [ruby/stringio] bump up to 3.0.6Nobuyoshi Nakada2023-02-021-1/+1
| | | | https://github.com/ruby/stringio/commit/325933500b
* [ruby/stringio] [Bug #19389] Fix chomping with longer separatorNobuyoshi Nakada2023-01-281-2/+3
| | | | https://github.com/ruby/stringio/commit/eb322a9716
* bump up to 3.0.5Sutou Kouhei2022-12-261-1/+1
|
* Merge stringio-3.0.4Hiroshi SHIBATA2022-12-091-21/+21
|
* [ruby/stringio] bump up to 3.0.5Sutou Kouhei2022-12-081-1/+1
| | | | https://github.com/ruby/stringio/commit/e62b9d78d3
* [ruby/stringio] bump up to 3.0.4Sutou Kouhei2022-12-081-1/+1
| | | | https://github.com/ruby/stringio/commit/5ba853d6ff
* [ruby/stringio] Revert "Bump version to 3.0.4"Hiroshi SHIBATA2022-12-051-1/+1
| | | | | | This reverts commit https://github.com/ruby/stringio/commit/aeb7e1a0bde6. https://github.com/ruby/stringio/commit/003dd0d003
* [ruby/stringio] Bump version to 3.0.4Hiroshi SHIBATA2022-12-051-1/+1
| | | | https://github.com/ruby/stringio/commit/aeb7e1a0bd
* [ruby/stringio] [DOC] Enhanced RDoc for StringIOBurdette Lamar2022-10-211-20/+24
| | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/36) Treats: - #each_codepoint - #gets - #readline (shows up in doc for module IO::generic_readable, not class StringIO) - #each_line https://github.com/ruby/stringio/commit/659aca7fe5
* [ruby/stringio] [DOC] Enhanced RDoc for StringIOBurdette Lamar2022-10-191-18/+23
| | | | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/35) Treated: - #getc - #getbyte - #ungetc - #ungetbyte - #readchar - #readbyte - #each_char https://github.com/ruby/stringio/commit/6400af8d9f
* [ruby/stringio] [DOC] StringIO doc enhancementsBurdette Lamar2022-10-191-42/+101
| | | | | | | | | | | | | | | | | | | (https://github.com/ruby/stringio/pull/33) Treated: - ::new - ::open - #string - #string= - #close - #close_read - #close_write - #closed? - #closed_read? - #closed_write? - #eof? https://github.com/ruby/stringio/commit/be9b64d739
* [DOC] Fix rdoc-refNobuyoshi Nakada2022-10-191-9/+9
|
* [DOC] Enhanced RDoc for StringIO (#34)Burdette Lamar2022-10-181-31/+52
| | | | | | | | | | | | | | Treated: - #lineno - #lineno= - #binmode - #reopen - #pos - #pos= - #rewind - #seek - #sync - #each_byte
* [ruby/stringio] Fix the result of `StringIO#truncate` so compatible with `File`Nobuyoshi Nakada2022-07-011-1/+1
| | | | https://github.com/ruby/stringio/commit/16847fea32