parser 3.3.4.0 → 3.3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parser/builders/default.rb +1 -1
- data/lib/parser/current.rb +1 -1
- data/lib/parser/source/buffer.rb +4 -5
- data/lib/parser/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 930b06a369a403803ac418b1a98aefc2ff86be0c2034596bae5abab2344ae406
|
4
|
+
data.tar.gz: ec389f48c3ba6e11099642ef13f175b09499ddc99e4788ed960b29c0af3ba845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 316d1af152d062f7b40575da9094c425b9dba3b5a1fa77be2aaad61c947e86174fb7c84ba55bfe4755e9ed501d7ae98161c5593c016601acc55a4dcbc805e966
|
7
|
+
data.tar.gz: dc925ec0ce088ccc1e0be970bfb90c75c11170bfcff4063aef033e54ae4cb0afd5eb3b3612d62efebbea5439328f138bd3386809b6c3c43849c2d0c374ce0878
|
@@ -426,7 +426,7 @@ module Parser
|
|
426
426
|
def regexp_compose(begin_t, parts, end_t, options)
|
427
427
|
begin
|
428
428
|
static_regexp(parts, options)
|
429
|
-
rescue RegexpError => e
|
429
|
+
rescue RegexpError, Encoding::UndefinedConversionError => e
|
430
430
|
diagnostic :error, :invalid_regexp, { :message => e.message },
|
431
431
|
loc(begin_t).join(loc(end_t))
|
432
432
|
end
|
data/lib/parser/current.rb
CHANGED
data/lib/parser/source/buffer.rb
CHANGED
@@ -94,16 +94,15 @@ module Parser
|
|
94
94
|
#
|
95
95
|
def self.reencode_string(input)
|
96
96
|
original_encoding = input.encoding
|
97
|
-
|
97
|
+
dup_input = input.dup
|
98
|
+
detected_encoding = recognize_encoding(dup_input.force_encoding(Encoding::BINARY))
|
98
99
|
|
99
100
|
if detected_encoding.nil?
|
100
|
-
|
101
|
+
dup_input.force_encoding(original_encoding)
|
101
102
|
elsif detected_encoding == Encoding::BINARY
|
102
103
|
input
|
103
104
|
else
|
104
|
-
|
105
|
-
force_encoding(detected_encoding).
|
106
|
-
encode(Encoding::UTF_8)
|
105
|
+
dup_input.force_encoding(detected_encoding).encode(Encoding::UTF_8)
|
107
106
|
end
|
108
107
|
end
|
109
108
|
|
data/lib/parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.4.
|
4
|
+
version: 3.3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- whitequark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|
@@ -251,9 +251,9 @@ licenses:
|
|
251
251
|
- MIT
|
252
252
|
metadata:
|
253
253
|
bug_tracker_uri: https://github.com/whitequark/parser/issues
|
254
|
-
changelog_uri: https://github.com/whitequark/parser/blob/v3.3.4.
|
255
|
-
documentation_uri: https://www.rubydoc.info/gems/parser/3.3.4.
|
256
|
-
source_code_uri: https://github.com/whitequark/parser/tree/v3.3.4.
|
254
|
+
changelog_uri: https://github.com/whitequark/parser/blob/v3.3.4.1/CHANGELOG.md
|
255
|
+
documentation_uri: https://www.rubydoc.info/gems/parser/3.3.4.1
|
256
|
+
source_code_uri: https://github.com/whitequark/parser/tree/v3.3.4.1
|
257
257
|
post_install_message:
|
258
258
|
rdoc_options: []
|
259
259
|
require_paths:
|