stringio 0.1.4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of stringio might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/ext/stringio/stringio.c +6 -53
- metadata +21 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41c6ce121bb7eb707f594272b5665080732c7eb7d5ae868f95bb633dc83711ae
|
4
|
+
data.tar.gz: d7c1e9260fa0095a95a31e7170264d0d40b4e0093b6bccd0ee84fc80e3c4f005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c19e3fa54ab666fe1ac76a398637e7181ca7e5948bb3576a2504e3a79253ab995dbf515bbaa52f01a6aec112f28102c002353038eced204ddeba0b15ea930544
|
7
|
+
data.tar.gz: 3d67ea8a7975013bdf361bf8ab80cd208187b6f4396a118fd16f1d6e9134ab0b596d4b7453b5bdaa0a7f232e08c0103ae3da638258f98baf2e4bd5bcaf5e35f8
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# StringIO
|
2
2
|
|
3
|
-
|
3
|
+
![ubuntu](https://github.com/ruby/stringio/workflows/ubuntu/badge.svg?branch=master&event=push)
|
4
|
+
![macos](https://github.com/ruby/stringio/workflows/macos/badge.svg?branch=master&event=push)
|
5
|
+
![windows](https://github.com/ruby/stringio/workflows/windows/badge.svg?branch=master&event=push)
|
4
6
|
|
5
7
|
Pseudo `IO` class from/to `String`.
|
6
8
|
|
data/ext/stringio/stringio.c
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
**********************************************************************/
|
13
13
|
|
14
|
-
#define STRINGIO_VERSION "0.
|
14
|
+
#define STRINGIO_VERSION "3.0.0"
|
15
15
|
|
16
16
|
#include "ruby.h"
|
17
17
|
#include "ruby/io.h"
|
@@ -832,18 +832,6 @@ strio_each_byte(VALUE self)
|
|
832
832
|
return self;
|
833
833
|
}
|
834
834
|
|
835
|
-
/*
|
836
|
-
* This is a deprecated alias for #each_byte.
|
837
|
-
*/
|
838
|
-
static VALUE
|
839
|
-
strio_bytes(VALUE self)
|
840
|
-
{
|
841
|
-
rb_warn("StringIO#bytes is deprecated; use #each_byte instead");
|
842
|
-
if (!rb_block_given_p())
|
843
|
-
return rb_enumeratorize(self, ID2SYM(rb_intern("each_byte")), 0, 0);
|
844
|
-
return strio_each_byte(self);
|
845
|
-
}
|
846
|
-
|
847
835
|
/*
|
848
836
|
* call-seq:
|
849
837
|
* strio.getc -> string or nil
|
@@ -1057,18 +1045,6 @@ strio_each_char(VALUE self)
|
|
1057
1045
|
return self;
|
1058
1046
|
}
|
1059
1047
|
|
1060
|
-
/*
|
1061
|
-
* This is a deprecated alias for #each_char.
|
1062
|
-
*/
|
1063
|
-
static VALUE
|
1064
|
-
strio_chars(VALUE self)
|
1065
|
-
{
|
1066
|
-
rb_warn("StringIO#chars is deprecated; use #each_char instead");
|
1067
|
-
if (!rb_block_given_p())
|
1068
|
-
return rb_enumeratorize(self, ID2SYM(rb_intern("each_char")), 0, 0);
|
1069
|
-
return strio_each_char(self);
|
1070
|
-
}
|
1071
|
-
|
1072
1048
|
/*
|
1073
1049
|
* call-seq:
|
1074
1050
|
* strio.each_codepoint {|c| block } -> strio
|
@@ -1101,18 +1077,6 @@ strio_each_codepoint(VALUE self)
|
|
1101
1077
|
return self;
|
1102
1078
|
}
|
1103
1079
|
|
1104
|
-
/*
|
1105
|
-
* This is a deprecated alias for #each_codepoint.
|
1106
|
-
*/
|
1107
|
-
static VALUE
|
1108
|
-
strio_codepoints(VALUE self)
|
1109
|
-
{
|
1110
|
-
rb_warn("StringIO#codepoints is deprecated; use #each_codepoint instead");
|
1111
|
-
if (!rb_block_given_p())
|
1112
|
-
return rb_enumeratorize(self, ID2SYM(rb_intern("each_codepoint")), 0, 0);
|
1113
|
-
return strio_each_codepoint(self);
|
1114
|
-
}
|
1115
|
-
|
1116
1080
|
/* Boyer-Moore search: copied from regex.c */
|
1117
1081
|
static void
|
1118
1082
|
bm_init_skip(long *skip, const char *pat, long m)
|
@@ -1363,18 +1327,6 @@ strio_each(int argc, VALUE *argv, VALUE self)
|
|
1363
1327
|
return self;
|
1364
1328
|
}
|
1365
1329
|
|
1366
|
-
/*
|
1367
|
-
* This is a deprecated alias for #each_line.
|
1368
|
-
*/
|
1369
|
-
static VALUE
|
1370
|
-
strio_lines(int argc, VALUE *argv, VALUE self)
|
1371
|
-
{
|
1372
|
-
rb_warn("StringIO#lines is deprecated; use #each_line instead");
|
1373
|
-
if (!rb_block_given_p())
|
1374
|
-
return rb_enumeratorize(self, ID2SYM(rb_intern("each_line")), argc, argv);
|
1375
|
-
return strio_each(argc, argv, self);
|
1376
|
-
}
|
1377
|
-
|
1378
1330
|
/*
|
1379
1331
|
* call-seq:
|
1380
1332
|
* strio.readlines(sep=$/, chomp: false) -> array
|
@@ -1798,6 +1750,11 @@ void
|
|
1798
1750
|
Init_stringio(void)
|
1799
1751
|
{
|
1800
1752
|
#undef rb_intern
|
1753
|
+
|
1754
|
+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
1755
|
+
rb_ext_ractor_safe(true);
|
1756
|
+
#endif
|
1757
|
+
|
1801
1758
|
VALUE StringIO = rb_define_class("StringIO", rb_cData);
|
1802
1759
|
|
1803
1760
|
rb_define_const(StringIO, "VERSION", rb_str_new_cstr(STRINGIO_VERSION));
|
@@ -1843,13 +1800,9 @@ Init_stringio(void)
|
|
1843
1800
|
|
1844
1801
|
rb_define_method(StringIO, "each", strio_each, -1);
|
1845
1802
|
rb_define_method(StringIO, "each_line", strio_each, -1);
|
1846
|
-
rb_define_method(StringIO, "lines", strio_lines, -1);
|
1847
1803
|
rb_define_method(StringIO, "each_byte", strio_each_byte, 0);
|
1848
|
-
rb_define_method(StringIO, "bytes", strio_bytes, 0);
|
1849
1804
|
rb_define_method(StringIO, "each_char", strio_each_char, 0);
|
1850
|
-
rb_define_method(StringIO, "chars", strio_chars, 0);
|
1851
1805
|
rb_define_method(StringIO, "each_codepoint", strio_each_codepoint, 0);
|
1852
|
-
rb_define_method(StringIO, "codepoints", strio_codepoints, 0);
|
1853
1806
|
rb_define_method(StringIO, "getc", strio_getc, 0);
|
1854
1807
|
rb_define_method(StringIO, "ungetc", strio_ungetc, 1);
|
1855
1808
|
rb_define_method(StringIO, "ungetbyte", strio_ungetbyte, 1);
|
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: 0.
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nobu Nakada
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Pseudo `IO` class from/to `String`.
|
28
42
|
email: nobu@ruby-lang.org
|
29
43
|
executables: []
|
@@ -36,9 +50,10 @@ files:
|
|
36
50
|
- ext/stringio/stringio.c
|
37
51
|
homepage: https://github.com/ruby/stringio
|
38
52
|
licenses:
|
53
|
+
- Ruby
|
39
54
|
- BSD-2-Clause
|
40
55
|
metadata: {}
|
41
|
-
post_install_message:
|
56
|
+
post_install_message:
|
42
57
|
rdoc_options: []
|
43
58
|
require_paths:
|
44
59
|
- lib
|
@@ -53,8 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
68
|
- !ruby/object:Gem::Version
|
54
69
|
version: '2.6'
|
55
70
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
57
|
-
signing_key:
|
71
|
+
rubygems_version: 3.1.4
|
72
|
+
signing_key:
|
58
73
|
specification_version: 4
|
59
74
|
summary: Pseudo IO on String
|
60
75
|
test_files: []
|