stringio 3.0.5 → 3.0.6
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 +4 -4
- data/ext/stringio/stringio.c +6 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33cdb98e67de55576e5f0f3ab5d77db8cd85a1b78287ab4533bee4c28782618a
|
4
|
+
data.tar.gz: a49ad49fe395ffd92fbd1dcf94be2b932ae7fc225905b83c1b22e4ead26c90fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd54ab4876d5d4a74854dc1fc649b4fcef93775cc043e7c4bb8dea1f8fd1ebc0f80106e16488806167e5dda6577c2e017535200f93f0fac7e9af356cfa927b14
|
7
|
+
data.tar.gz: 6a1a2425eaa1d105955c140ee4c6457dec97605e3b0b1583fd4d3061f7a92ee4ce106d7654bd758934ad5e42d17dc0862f9bf77abf97f575853ba5454fdad19f
|
data/ext/stringio/stringio.c
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
**********************************************************************/
|
14
14
|
|
15
|
-
#define STRINGIO_VERSION "3.0.
|
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
|
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
|
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
|
-
|
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.
|
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-
|
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.
|
46
|
+
rubygems_version: 3.4.10
|
47
47
|
signing_key:
|
48
48
|
specification_version: 4
|
49
49
|
summary: Pseudo IO on String
|