stringio 3.0.1 → 3.0.1.1

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 +2 -2
  3. metadata +3 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 709966f48107a3b3ab9c8b6195ffc21e7e887b7e02c139e4608b20e265ce63c5
4
- data.tar.gz: '087dda134d3df50928ebb2a941032a4b5a94fafb1a2dc15057a801a3bfff2d65'
3
+ metadata.gz: 7c86f86172a6b8f70ac2b4263064b3b27f2919e4114a412a7a6bbbc20664886d
4
+ data.tar.gz: cf5ad5b78b3e544195c11a5280cfee89c1c97ecdf1c1cc8c9f8470e4f2758a87
5
5
  SHA512:
6
- metadata.gz: 38f467c080782fdca0e76f32c75aac445457d653eea491bd3219f412682889e6613c363062700901948cc372af9227dceba622cc77a84b01455fd6af38247c69
7
- data.tar.gz: f17f06857188c5f7cac5810fb6c98cbf2615832a785ea0b19e3e91d6754d9136498694da628e61ba4a5ceb39ba7b7afad63d443c473c49364f423d08d0e19e75
6
+ metadata.gz: 340c0a775cd3f3622942b87e7bfc3a7887f259e01370a8aefa18ae383a672e8ee5df3b1e5666e9b7cab4a02a898bcbaf99e49ab5ad9b74a9e65c882459b44c6b
7
+ data.tar.gz: c8a2cf3a58fa211c76ac63f17827beead45c6f53dffd1e68f024d88ae6329d353d78f30d902735afd802624a334683c6739e5e265301c3282301c4181face1d5
@@ -12,7 +12,7 @@
12
12
 
13
13
  **********************************************************************/
14
14
 
15
- #define STRINGIO_VERSION "3.0.1"
15
+ #define STRINGIO_VERSION "3.0.1.1"
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 = (rest < 0 ? cl-pos : cl+rest);
987
+ long ex = cl - (rest < 0 ? pos : len);
988
988
  rb_str_modify_expand(str, ex);
989
989
  rb_str_set_len(str, len + ex);
990
990
  s = RSTRING_PTR(str);
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stringio
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobu Nakada
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-10-21 00:00:00.000000000 Z
10
+ date: 2024-03-19 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Pseudo `IO` class from/to `String`.
14
13
  email: nobu@ruby-lang.org
@@ -25,7 +24,6 @@ licenses:
25
24
  - Ruby
26
25
  - BSD-2-Clause
27
26
  metadata: {}
28
- post_install_message:
29
27
  rdoc_options: []
30
28
  require_paths:
31
29
  - lib
@@ -40,8 +38,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
38
  - !ruby/object:Gem::Version
41
39
  version: '2.6'
42
40
  requirements: []
43
- rubygems_version: 3.3.0.dev
44
- signing_key:
41
+ rubygems_version: 3.6.0.dev
45
42
  specification_version: 4
46
43
  summary: Pseudo IO on String
47
44
  test_files: []