stringio 3.0.1.2 → 3.0.2.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/stringio/stringio.c +4 -5
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 485b4a853f043d25f1c1a3ece1a7f1e8a1720ee7157bcde9df858ac0f9b61701
|
4
|
+
data.tar.gz: f6f24d32282461b5c3b97d1576a7a510def637d0c9dc98834876e5ecbd2792b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2c05da950d38ff21f3b4d4836be02dd7f9c479daff89fb648f84ccfb857a8611bfa2a0ab716f03316887790c70802d83b9a8867705b5aaddbadc9906f23b3a8
|
7
|
+
data.tar.gz: c9eb88894bc04413f3ed136b0d5801439913bc9721cf6e8daa5c77cdd118ea2aadab3830d0522949d1147294eda81db09f0e5a43d5ff68d5d49f37c8d305d532
|
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.2.pre1"
|
16
16
|
|
17
17
|
#include "ruby.h"
|
18
18
|
#include "ruby/io.h"
|
@@ -984,7 +984,7 @@ strio_unget_bytes(struct StringIO *ptr, const char *cp, long cl)
|
|
984
984
|
len = RSTRING_LEN(str);
|
985
985
|
rest = pos - len;
|
986
986
|
if (cl > pos) {
|
987
|
-
long ex =
|
987
|
+
long ex = (rest < 0 ? cl-pos : cl+rest);
|
988
988
|
rb_str_modify_expand(str, ex);
|
989
989
|
rb_str_set_len(str, len + ex);
|
990
990
|
s = RSTRING_PTR(str);
|
@@ -1233,9 +1233,8 @@ strio_getline(struct getline_arg *arg, struct StringIO *ptr)
|
|
1233
1233
|
str = strio_substr(ptr, ptr->pos, e - s - w, enc);
|
1234
1234
|
}
|
1235
1235
|
else {
|
1236
|
-
if (n < e - s
|
1237
|
-
|
1238
|
-
if (e - s < 1024 || n == e - s) {
|
1236
|
+
if (n < e - s) {
|
1237
|
+
if (e - s < 1024) {
|
1239
1238
|
for (p = s; p + n <= e; ++p) {
|
1240
1239
|
if (MEMCMP(p, RSTRING_PTR(str), char, n) == 0) {
|
1241
1240
|
e = p + (arg->chomp ? 0 : n);
|
metadata
CHANGED
@@ -1,16 +1,20 @@
|
|
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.2.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nobu Nakada
|
8
|
+
- Charles Oliver Nutter
|
9
|
+
autorequire:
|
8
10
|
bindir: bin
|
9
11
|
cert_chain: []
|
10
|
-
date:
|
12
|
+
date: 2022-04-15 00:00:00.000000000 Z
|
11
13
|
dependencies: []
|
12
14
|
description: Pseudo `IO` class from/to `String`.
|
13
|
-
email:
|
15
|
+
email:
|
16
|
+
- nobu@ruby-lang.org
|
17
|
+
- headius@headius.com
|
14
18
|
executables: []
|
15
19
|
extensions:
|
16
20
|
- ext/stringio/extconf.rb
|
@@ -24,6 +28,7 @@ licenses:
|
|
24
28
|
- Ruby
|
25
29
|
- BSD-2-Clause
|
26
30
|
metadata: {}
|
31
|
+
post_install_message:
|
27
32
|
rdoc_options: []
|
28
33
|
require_paths:
|
29
34
|
- lib
|
@@ -38,7 +43,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
38
43
|
- !ruby/object:Gem::Version
|
39
44
|
version: '2.6'
|
40
45
|
requirements: []
|
41
|
-
rubygems_version: 3.
|
46
|
+
rubygems_version: 3.3.7
|
47
|
+
signing_key:
|
42
48
|
specification_version: 4
|
43
49
|
summary: Pseudo IO on String
|
44
50
|
test_files: []
|