strscan 3.0.1 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/strscan/extconf.rb +7 -3
- data/ext/strscan/strscan.c +8 -6
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e5354e51b2cc2251f6ae48f0696ef8cef2db556c198c747bbc1df15eb2660c4
|
4
|
+
data.tar.gz: a6a438ef984a097547bc0e406620ff4fb27f5df865bdf737d9bb0a83c5f4552f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0c87413dbaf72c9fb4b3daa76a23540ed716b9d6174e87d06d81bcc2d6dd9c8c747659d67f51cfca142f00c7291816cad7df0d2c9fbc01b86875e31232c9aaa
|
7
|
+
data.tar.gz: 6b25e34c68ac648e539fd5f13fb015380e1d0ae3c92f6cfa722ae488ab1392596db10505b103fe772b8e0764e1333cc28119c61682f93271112acea438e7146f
|
data/ext/strscan/extconf.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'mkmf'
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
if RUBY_ENGINE == 'ruby'
|
4
|
+
$INCFLAGS << " -I$(top_srcdir)" if $extmk
|
5
|
+
have_func("onig_region_memsize", "ruby.h")
|
6
|
+
create_makefile 'strscan'
|
7
|
+
else
|
8
|
+
File.write('Makefile', dummy_makefile("").join)
|
9
|
+
end
|
data/ext/strscan/strscan.c
CHANGED
@@ -22,7 +22,7 @@ extern size_t onig_region_memsize(const struct re_registers *regs);
|
|
22
22
|
|
23
23
|
#include <stdbool.h>
|
24
24
|
|
25
|
-
#define STRSCAN_VERSION "3.0.
|
25
|
+
#define STRSCAN_VERSION "3.0.3"
|
26
26
|
|
27
27
|
/* =======================================================================
|
28
28
|
Data Type Definitions
|
@@ -435,11 +435,11 @@ strscan_get_pos(VALUE self)
|
|
435
435
|
*
|
436
436
|
* In short, it's a 0-based index into the string.
|
437
437
|
*
|
438
|
-
* s = StringScanner.new("
|
439
|
-
* s.charpos
|
440
|
-
* s.scan_until(
|
441
|
-
* s.pos
|
442
|
-
* s.charpos
|
438
|
+
* s = StringScanner.new("abc\u00e4def\u00f6ghi")
|
439
|
+
* s.charpos # -> 0
|
440
|
+
* s.scan_until(/\u00e4/) # -> "abc\u00E4"
|
441
|
+
* s.pos # -> 5
|
442
|
+
* s.charpos # -> 4
|
443
443
|
*/
|
444
444
|
static VALUE
|
445
445
|
strscan_get_charpos(VALUE self)
|
@@ -1468,6 +1468,8 @@ strscan_fixed_anchor_p(VALUE self)
|
|
1468
1468
|
* StringScanner provides for lexical scanning operations on a String. Here is
|
1469
1469
|
* an example of its usage:
|
1470
1470
|
*
|
1471
|
+
* require 'strscan'
|
1472
|
+
*
|
1471
1473
|
* s = StringScanner.new('This is an example string')
|
1472
1474
|
* s.eos? # -> false
|
1473
1475
|
*
|
metadata
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strscan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
- Sutou Kouhei
|
9
|
+
- Charles Oliver Nutter
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2022-05-10 00:00:00.000000000 Z
|
13
14
|
dependencies: []
|
14
15
|
description: Provides lexical scanning operations on a String.
|
15
16
|
email:
|
16
17
|
-
|
17
18
|
- kou@cozmixng.org
|
19
|
+
- headius@headius.com
|
18
20
|
executables: []
|
19
21
|
extensions:
|
20
22
|
- ext/strscan/extconf.rb
|
@@ -42,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
42
44
|
- !ruby/object:Gem::Version
|
43
45
|
version: '0'
|
44
46
|
requirements: []
|
45
|
-
rubygems_version: 3.3.
|
47
|
+
rubygems_version: 3.3.7
|
46
48
|
signing_key:
|
47
49
|
specification_version: 4
|
48
50
|
summary: Provides lexical scanning operations on a String.
|