stringio 3.1.6 → 3.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 144b6bb8aaa29ad8b3447e979841af712093bdfe19623f26d46a595740541da6
4
- data.tar.gz: a0936d98e00b6dec96769e8189b564fee83d922a7d7f2787fa58b15e648ff22f
3
+ metadata.gz: d32a3b9eb5ecb12a5c78c7a79418ed351272fe49a2fc1bbde837880a8e6a2a53
4
+ data.tar.gz: 8f965cb4f731147e7d6da44db5acbeda3a08ac51df419445d8001f35b17a1dc9
5
5
  SHA512:
6
- metadata.gz: 3c49d46b584a010121a0c20a176a1e389178f8e53810d9898107c28154116519caf8883d68339a69a580b684f236854c36eecd4562182bf1724e67d951351a05
7
- data.tar.gz: 69189970d83c1093020071a1c86c7eb60067b06e0500b112aa55c82ad97a95ad4ba66ce7f08c018ae58312a662a9cc55de59129c5d6ebcad93c2ec9c5927ed98
6
+ metadata.gz: 6c3f11fa1dee2b8e00269cad5e99db7014ecdc7b1b7d99f5086d15fb3f04d17105dabd838887e5f87af817851e2a8a59260c7c7af26a5ea40f2ce103ad830775
7
+ data.tar.gz: c9e2afe1c8104c27591454cfeefdc71926c76196d3afc343f76052b9e465566f62df19ae25baaa1217839684910b0c94e4d05b7b08723f1960065f0c2d0844df
data/NEWS.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # News
2
2
 
3
+ ## 3.1.7 - 2025-04-21
4
+
5
+ ### Improvements
6
+
7
+ * CRuby: Added support for `rb_io_mode_t` that will be introduced in
8
+ Ruby 3.5 or later.
9
+ * GH-129
10
+ * Patch by Samuel Williams
11
+
12
+ ### Thanks
13
+
14
+ * Samuel Williams
15
+
3
16
  ## 3.1.6 - 2025-03-25
4
17
 
5
18
  ### Fixes
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: false
2
2
  require 'mkmf'
3
3
  if RUBY_ENGINE == 'ruby'
4
+ have_type("rb_io_mode_t", "ruby/io.h")
5
+
4
6
  create_makefile('stringio')
5
7
  else
6
8
  File.write('Makefile', dummy_makefile("").join)
@@ -13,7 +13,7 @@
13
13
  **********************************************************************/
14
14
 
15
15
  static const char *const
16
- STRINGIO_VERSION = "3.1.6";
16
+ STRINGIO_VERSION = "3.1.7";
17
17
 
18
18
  #include <stdbool.h>
19
19
 
@@ -35,12 +35,16 @@ STRINGIO_VERSION = "3.1.6";
35
35
  # define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass)
36
36
  #endif
37
37
 
38
+ #ifndef HAVE_TYPE_RB_IO_MODE_T
39
+ typedef int rb_io_mode_t;
40
+ #endif
41
+
38
42
  struct StringIO {
39
43
  VALUE string;
40
44
  rb_encoding *enc;
41
45
  long pos;
42
46
  long lineno;
43
- int flags;
47
+ rb_io_mode_t flags;
44
48
  int count;
45
49
  };
46
50
 
@@ -1852,7 +1856,8 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
1852
1856
  enc = rb_find_encoding(ext_enc);
1853
1857
  if (!enc) {
1854
1858
  rb_io_enc_t convconfig;
1855
- int oflags, fmode;
1859
+ int oflags;
1860
+ rb_io_mode_t fmode;
1856
1861
  VALUE vmode = rb_str_append(rb_str_new_cstr("r:"), ext_enc);
1857
1862
  rb_io_extract_modeenc(&vmode, 0, Qnil, &oflags, &fmode, &convconfig);
1858
1863
  enc = convconfig.enc2;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringio
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.6
4
+ version: 3.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobu Nakada
8
8
  - Charles Oliver Nutter
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-25 00:00:00.000000000 Z
11
+ date: 2025-04-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Pseudo `IO` class from/to `String`.
14
14
  email:
@@ -42,7 +42,7 @@ licenses:
42
42
  - Ruby
43
43
  - BSD-2-Clause
44
44
  metadata:
45
- changelog_uri: https://github.com/ruby/stringio/releases/tag/v3.1.6
45
+ changelog_uri: https://github.com/ruby/stringio/releases/tag/v3.1.7
46
46
  rdoc_options: []
47
47
  require_paths:
48
48
  - lib
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubygems_version: 3.6.2
60
+ rubygems_version: 3.6.7
61
61
  specification_version: 4
62
62
  summary: Pseudo IO on String
63
63
  test_files: []