stringio 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/ext/stringio/stringio.c +6 -11
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd5cdd012959f081ba2717eb15a3a6f3ca015ec48bba03ef1bf318686007dac2
4
- data.tar.gz: 57842131091d3f2a38c03abfb8e294c51361c844b0777086126c034a1a904537
3
+ metadata.gz: 33cdb98e67de55576e5f0f3ab5d77db8cd85a1b78287ab4533bee4c28782618a
4
+ data.tar.gz: a49ad49fe395ffd92fbd1dcf94be2b932ae7fc225905b83c1b22e4ead26c90fe
5
5
  SHA512:
6
- metadata.gz: 2cb53aa9936ad5464a40268c1b4477f06dcde9f4a456107aeb897812c1a1b52859bbe88a90e8d82dd8b30819444cb5c2b05193ab40c2ccb43a04e03002183b2d
7
- data.tar.gz: aefe614e34d66c31b2ddc0c78788e85fba60279c081b65645786cbcaf936e20a42edaa5ef5615dcf4aff6eb10258a1823eee99e89c81f5ed0e01348692bfeb38
6
+ metadata.gz: cd54ab4876d5d4a74854dc1fc649b4fcef93775cc043e7c4bb8dea1f8fd1ebc0f80106e16488806167e5dda6577c2e017535200f93f0fac7e9af356cfa927b14
7
+ data.tar.gz: 6a1a2425eaa1d105955c140ee4c6457dec97605e3b0b1583fd4d3061f7a92ee4ce106d7654bd758934ad5e42d17dc0862f9bf77abf97f575853ba5454fdad19f
@@ -12,7 +12,7 @@
12
12
 
13
13
  **********************************************************************/
14
14
 
15
- #define STRINGIO_VERSION "3.0.5"
15
+ #define STRINGIO_VERSION "3.0.6"
16
16
 
17
17
  #include "ruby.h"
18
18
  #include "ruby/io.h"
@@ -171,7 +171,7 @@ static const rb_data_type_t strio_data_type = {
171
171
  strio_free,
172
172
  strio_memsize,
173
173
  },
174
- 0, 0, RUBY_TYPED_FREE_IMMEDIATELY
174
+ 0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
175
175
  };
176
176
 
177
177
  #define check_strio(self) ((struct StringIO*)rb_check_typeddata((self), &strio_data_type))
@@ -379,7 +379,7 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr, VALUE self)
379
379
  if (ptr->flags & FMODE_TRUNC) {
380
380
  rb_str_resize(string, 0);
381
381
  }
382
- ptr->string = string;
382
+ RB_OBJ_WRITE(self, &ptr->string, string);
383
383
  if (argc == 1) {
384
384
  ptr->enc = rb_enc_get(string);
385
385
  }
@@ -397,7 +397,7 @@ static VALUE
397
397
  strio_finalize(VALUE self)
398
398
  {
399
399
  struct StringIO *ptr = StringIO(self);
400
- ptr->string = Qnil;
400
+ RB_OBJ_WRITE(self, &ptr->string, Qnil);
401
401
  ptr->flags &= ~FMODE_READWRITE;
402
402
  return self;
403
403
  }
@@ -563,7 +563,8 @@ strio_set_string(VALUE self, VALUE string)
563
563
  ptr->flags = OBJ_FROZEN(string) ? FMODE_READABLE : FMODE_READWRITE;
564
564
  ptr->pos = 0;
565
565
  ptr->lineno = 0;
566
- return ptr->string = string;
566
+ RB_OBJ_WRITE(self, &ptr->string, string);
567
+ return string;
567
568
  }
568
569
 
569
570
  /*
@@ -685,8 +686,6 @@ strio_to_read(VALUE self)
685
686
  * see {Position}[rdoc-ref:File@Position].
686
687
  *
687
688
  * Raises IOError if the stream is not opened for reading.
688
- *
689
- * StreamIO#eof is an alias for StreamIO#eof?.
690
689
  */
691
690
  static VALUE
692
691
  strio_eof(VALUE self)
@@ -808,8 +807,6 @@ strio_reopen(int argc, VALUE *argv, VALUE self)
808
807
  *
809
808
  * Returns the current position (in bytes);
810
809
  * see {Position}[rdoc-ref:IO@Position].
811
- *
812
- * StringIO#tell is an alias for StringIO#pos.
813
810
  */
814
811
  static VALUE
815
812
  strio_get_pos(VALUE self)
@@ -1420,8 +1417,6 @@ strio_readline(int argc, VALUE *argv, VALUE self)
1420
1417
  * does nothing if already at end-of-file;
1421
1418
  * returns +self+.
1422
1419
  * See {Line IO}[rdoc-ref:IO@Line+IO].
1423
- *
1424
- * StringIO#each is an alias for StringIO#each_line.
1425
1420
  */
1426
1421
  static VALUE
1427
1422
  strio_each(int argc, VALUE *argv, VALUE self)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringio
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobu Nakada
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-03 00:00:00.000000000 Z
12
+ date: 2023-04-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Pseudo `IO` class from/to `String`.
15
15
  email:
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  - !ruby/object:Gem::Version
44
44
  version: '2.6'
45
45
  requirements: []
46
- rubygems_version: 3.4.1
46
+ rubygems_version: 3.4.10
47
47
  signing_key:
48
48
  specification_version: 4
49
49
  summary: Pseudo IO on String