strscan 3.0.0 → 3.0.1
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/strscan/strscan.c +8 -11
- metadata +4 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb6c9172a12bb6e8efe99b6c3cf6250b7d6d3427ce277016ff0bd1e7a6b1193e
|
4
|
+
data.tar.gz: 5fa8c406f3cd280d8faedd1cc840950aa472f4d25e46a5a6c8ae3304b8f8ee03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9c0d682667c54053aa7e5f8fc276a67481b452a606e268d4ac76cbdf1f656cc1f8b346adf59037089897be83684caacb1319411e1e2c4a3c5f694477ece5de
|
7
|
+
data.tar.gz: 5d584fbcd23d3d297585aeba30b6c61237170730be51f9df1b369ca8f9e1919f2e843ce9f30039df12a6e943079591420bd2dac7d8a69b0a9d747f3b433c3e25
|
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.1"
|
26
26
|
|
27
27
|
/* =======================================================================
|
28
28
|
Data Type Definitions
|
@@ -445,13 +445,10 @@ static VALUE
|
|
445
445
|
strscan_get_charpos(VALUE self)
|
446
446
|
{
|
447
447
|
struct strscanner *p;
|
448
|
-
VALUE substr;
|
449
448
|
|
450
449
|
GET_SCANNER(self, p);
|
451
450
|
|
452
|
-
|
453
|
-
|
454
|
-
return rb_str_length(substr);
|
451
|
+
return LONG2NUM(rb_enc_strlen(S_PBEG(p), CURPTR(p), rb_enc_get(p->str)));
|
455
452
|
}
|
456
453
|
|
457
454
|
/*
|
@@ -984,7 +981,7 @@ strscan_unscan(VALUE self)
|
|
984
981
|
}
|
985
982
|
|
986
983
|
/*
|
987
|
-
* Returns +true+
|
984
|
+
* Returns +true+ if and only if the scan pointer is at the beginning of the line.
|
988
985
|
*
|
989
986
|
* s = StringScanner.new("test\ntest\n")
|
990
987
|
* s.bol? # => true
|
@@ -1037,7 +1034,7 @@ strscan_empty_p(VALUE self)
|
|
1037
1034
|
}
|
1038
1035
|
|
1039
1036
|
/*
|
1040
|
-
* Returns true
|
1037
|
+
* Returns true if and only if there is more data in the string. See #eos?.
|
1041
1038
|
* This method is obsolete; use #eos? instead.
|
1042
1039
|
*
|
1043
1040
|
* s = StringScanner.new('test string')
|
@@ -1054,7 +1051,7 @@ strscan_rest_p(VALUE self)
|
|
1054
1051
|
}
|
1055
1052
|
|
1056
1053
|
/*
|
1057
|
-
* Returns +true+
|
1054
|
+
* Returns +true+ if and only if the last match was successful.
|
1058
1055
|
*
|
1059
1056
|
* s = StringScanner.new('test string')
|
1060
1057
|
* s.match?(/\w+/) # => 4
|
@@ -1537,7 +1534,7 @@ strscan_fixed_anchor_p(VALUE self)
|
|
1537
1534
|
*
|
1538
1535
|
* === Finding Where we Are
|
1539
1536
|
*
|
1540
|
-
* - #beginning_of_line? (
|
1537
|
+
* - #beginning_of_line? (<tt>#bol?</tt>)
|
1541
1538
|
* - #eos?
|
1542
1539
|
* - #rest?
|
1543
1540
|
* - #rest_size
|
@@ -1554,13 +1551,13 @@ strscan_fixed_anchor_p(VALUE self)
|
|
1554
1551
|
* - #matched
|
1555
1552
|
* - #matched?
|
1556
1553
|
* - #matched_size
|
1557
|
-
* - []
|
1554
|
+
* - <tt>#[]</tt>
|
1558
1555
|
* - #pre_match
|
1559
1556
|
* - #post_match
|
1560
1557
|
*
|
1561
1558
|
* === Miscellaneous
|
1562
1559
|
*
|
1563
|
-
* -
|
1560
|
+
* - <tt><<</tt>
|
1564
1561
|
* - #concat
|
1565
1562
|
* - #string
|
1566
1563
|
* - #string=
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
@@ -9,50 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rake-compiler
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :development
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: benchmark-driver
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: '0'
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: test-unit
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '0'
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '0'
|
12
|
+
date: 2021-10-22 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
56
14
|
description: Provides lexical scanning operations on a String.
|
57
15
|
email:
|
58
16
|
-
|
@@ -84,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
42
|
- !ruby/object:Gem::Version
|
85
43
|
version: '0'
|
86
44
|
requirements: []
|
87
|
-
rubygems_version: 3.
|
45
|
+
rubygems_version: 3.3.0.dev
|
88
46
|
signing_key:
|
89
47
|
specification_version: 4
|
90
48
|
summary: Provides lexical scanning operations on a String.
|