Граф коммитов

277 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA c32a30ec09 [ruby/stringio] Development of 3.0.8 started.
https://github.com/ruby/stringio/commit/1587d3698e
2023-06-02 08:20:38 +00:00
Samuel Williams d5a5333168 [ruby/stringio] Avoid direct struct usage.
(https://github.com/ruby/stringio/pull/54)

We will eventually want to refactor this, but for now this is compatible
enough.
2023-06-01 11:41:19 +00:00
NARUSE, Yui 85dcc4866d Revert "Hide most of the implementation of `struct rb_io`. (#6511)"
This reverts commit 18e55fc1e1.

fix [Bug #19704]
https://bugs.ruby-lang.org/issues/19704
This breaks compatibility for extension libraries. Such changes
need a discussion.
2023-06-01 08:43:22 +09:00
Samuel Williams 18e55fc1e1
Hide most of the implementation of `struct rb_io`. (#6511)
* 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>
2023-05-30 10:02:40 +09:00
Nobuyoshi Nakada 6987ec45b1 [ruby/stringio] Drop support for ruby 2.6 or earlier
(https://github.com/ruby/stringio/pull/47)

`rb_io_extract_modeenc` has been exported since ruby 2.7.
2023-05-08 07:21:21 +00:00
Nobuyoshi Nakada 409a13e9ea [ruby/stringio] Update write-barrier at copying
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
2023-05-03 05:38:27 +00:00
Sutou Kouhei 67743d5823 [ruby/stringio] Development of 3.0.7 started.
https://github.com/ruby/stringio/commit/5d39880f70
2023-04-14 06:38:51 +00:00
Matt Valentine-House 5e4b80177e Update the depend files 2023-02-28 09:09:00 -08:00
Jean Boussier 71dae78b89 [ruby/stringio] Implement write barrier on StringIO
It only has a single reference set in 3 places which
makes it fairly easy to implement.

https://github.com/ruby/stringio/commit/009896b973
2023-02-28 03:07:10 +00:00
Matt Valentine-House f38c6552f9 Remove intern/gc.h from Make deps 2023-02-27 10:11:56 -08:00
BurdetteLamar d3ee9e590c [ruby/stringio] Remove (newly unneeded) remarks about aliases
https://github.com/ruby/stringio/commit/60bb320477
2023-02-25 08:38:19 +00:00
Nobuyoshi Nakada 899ea35035
Extract include/ruby/internal/attr/packed_struct.h
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`
2023-02-08 12:34:13 +09:00
Nobuyoshi Nakada cbd5de4f88 [ruby/stringio] Development of 3.0.6 started.
https://github.com/ruby/stringio/commit/a7561f447b
2023-02-03 07:49:31 +00:00
Nobuyoshi Nakada 89d9547800 [ruby/stringio] Revert "bump up to 3.0.6" [ci skip]
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
2023-02-02 12:44:53 +00:00
Nobuyoshi Nakada 8087ba736e [ruby/stringio] bump up to 3.0.6
https://github.com/ruby/stringio/commit/325933500b
2023-02-02 04:44:38 +00:00
Nobuyoshi Nakada 21dced8b01 [ruby/stringio] [Bug #19389] Fix chomping with longer separator
https://github.com/ruby/stringio/commit/eb322a9716
2023-01-28 13:00:08 +00:00
Sutou Kouhei 10c9ce9d4c bump up to 3.0.5 2022-12-26 15:09:21 +09:00
Hiroshi SHIBATA 7d04cddfef Merge stringio-3.0.4 2022-12-09 16:36:22 +09:00
Sutou Kouhei 8bbf4e5d8d [ruby/stringio] bump up to 3.0.5
https://github.com/ruby/stringio/commit/e62b9d78d3
2022-12-08 20:58:53 +00:00
Sutou Kouhei b9d055d760 [ruby/stringio] bump up to 3.0.4
https://github.com/ruby/stringio/commit/5ba853d6ff
2022-12-08 05:12:15 +00:00
Hiroshi SHIBATA faafb7b740 [ruby/stringio] Revert "Bump version to 3.0.4"
This reverts commit https://github.com/ruby/stringio/commit/aeb7e1a0bde6.

https://github.com/ruby/stringio/commit/003dd0d003
2022-12-05 08:03:29 +00:00
Hiroshi SHIBATA 95e272baf8 [ruby/stringio] Bump version to 3.0.4
https://github.com/ruby/stringio/commit/aeb7e1a0bd
2022-12-05 08:02:25 +00:00
Burdette Lamar 35e03a44b8 [ruby/stringio] [DOC] Enhanced RDoc for StringIO
(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
2022-10-21 14:12:45 +00:00
Burdette Lamar c32180d5ce [ruby/stringio] [DOC] Enhanced RDoc for StringIO
(https://github.com/ruby/stringio/pull/35)

Treated:
- #getc
- #getbyte
- #ungetc
- #ungetbyte
- #readchar
- #readbyte
- #each_char

https://github.com/ruby/stringio/commit/6400af8d9f
2022-10-19 15:33:08 +00:00
Burdette Lamar 18b96d8a82 [ruby/stringio] [DOC] StringIO doc enhancements
(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
2022-10-19 09:12:18 +09:00
Nobuyoshi Nakada 01d56b99bf
[DOC] Fix rdoc-ref 2022-10-19 08:52:29 +09:00
Burdette Lamar 6bd72a6406 [DOC] Enhanced RDoc for StringIO (#34)
Treated:
- #lineno
- #lineno=
- #binmode
- #reopen
- #pos
- #pos=
- #rewind
- #seek
- #sync
- #each_byte
2022-10-18 18:41:00 +00:00
Nobuyoshi Nakada 302f353fd9 [ruby/stringio] Fix the result of `StringIO#truncate` so compatible with `File`
https://github.com/ruby/stringio/commit/16847fea32
2022-07-01 00:52:29 +09:00
Nobuyoshi Nakada 7976142791 [ruby/stringio] Fix extracting encoding names in the fallback code
https://github.com/ruby/stringio/commit/0fe2e0c1e5
2022-05-30 14:48:45 +09:00
Nobuyoshi Nakada d3e986d9ab [ruby/stringio] Accept external and internal encodings pair
Fix https://github.com/ruby/stringio/pull/16

https://github.com/ruby/stringio/commit/c8a69e80d2
2022-05-30 14:48:44 +09:00
Jeremy Evans 609d73e892 [ruby/stringio] Fix handling of chomp with paragraph separator
Try to mirror IO behavior, where chomp takes out the entire paragraph
separators between entries, but does not chomp a single line separator
at the end of the string.

Partially Fixes [Bug #18768]

https://github.com/ruby/stringio/commit/a83ddbb7f0
2022-05-30 13:10:46 +09:00
Jeremy Evans 7e3920f0d9 [ruby/stringio] Update ext/stringio/stringio.c
https://github.com/ruby/stringio/commit/1edc88587e

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-05-30 13:01:18 +09:00
Jeremy Evans adaaf12857 [ruby/stringio] Ignore chomp keyword for nil separator
nil separator means no separator at all, so nothing should be
chomped.

Partial fix for Ruby [Bug #18770]

https://github.com/ruby/stringio/commit/feaa2ec631
2022-05-30 13:01:17 +09:00
Jeremy Evans 1f82269f4e [ruby/stringio] Fix each with multiple character string and chomp
Previously, this could result in an infinite loop.  Always update
the e pointer in this case, setting w when chomping so the chomped
data is not included in the output.

Fixes [Bug #18769]

https://github.com/ruby/stringio/commit/4bf64d5130
2022-05-30 12:55:47 +09:00
Nobuyoshi Nakada bb6357cddd [ruby/stringio] Fix expanding size at ungetc/ungetbyte
https://github.com/ruby/stringio/commit/a35268a3ac
2022-05-30 12:51:37 +09:00
Hiroshi SHIBATA bcc9451bbf
Merge JRuby implementation for stringio and io-wait 2022-05-20 18:45:14 +09:00
Sutou Kouhei 30632efeaa [ruby/stringio] bump up to 3.0.3
https://github.com/ruby/stringio/commit/64f225bf00
2022-05-09 16:47:28 +09:00
Sutou Kouhei fbbe7ac7e3 [ruby/stringio] Bump version
https://github.com/ruby/stringio/commit/b79152d08f
2022-05-09 16:36:01 +09:00
Sutou Kouhei 2aca566a10 [ruby/stringio] bump up to 3.0.2.pre1
https://github.com/ruby/stringio/commit/14ec9bc193
2022-04-16 06:34:31 +09:00
Peter Zhu 2d5ecd60a5 [Feature #18249] Update dependencies 2022-02-22 09:55:21 -05:00
Nobuyoshi Nakada ac152b3cac
Update dependencies 2021-11-21 16:21:18 +09:00
Hiroshi SHIBATA 8eb8522f47 [ruby/stringio] Bump up stringio version to 3.0.1
https://github.com/ruby/stringio/commit/f7c40aa339
2021-10-21 20:53:53 +09:00
卜部昌平 5c167a9778 ruby tool/update-deps --fix 2021-10-05 14:18:23 +09:00
Nobuyoshi Nakada 771f6dd75d
[ruby/stringio] Suppress a sign-compare warning
https://github.com/ruby/stringio/commit/a88c070e0b
2021-07-08 16:43:22 +09:00
卜部昌平 6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Nobuyoshi Nakada 32a13591e0
[ruby/stringio] Check if closed in loop
[Bug #17675] https://bugs.ruby-lang.org/issues/17675

https://github.com/ruby/stringio/commit/1ed61d0cbc
2021-03-08 10:13:29 +09:00
Hiroshi SHIBATA 99f54c0895
[ruby/stringio] Use Gemfile instead of Gem::Specification#add_development_dependency.
https://github.com/ruby/stringio/commit/157fe9f04d
2021-03-08 10:12:57 +09:00
Nobuyoshi Nakada 8918a9cf6c Removed rb_cData entity
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
2020-12-22 02:51:49 +09:00
Kenta Murata c71934f8a5
[stringio] Version 3.0.0
https://github.com/ruby/stringio/commit/831be01071
2020-12-18 22:00:07 +09:00
Kenta Murata e1b5289a2b
[stringio] Add test-unit in the development dependencies
https://github.com/ruby/stringio/commit/de010fc0e9
2020-12-18 22:00:07 +09:00