parser 3.3.4.1 → 3.3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parser/source/buffer.rb +5 -4
- 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: d0721a00def81d4aa65baaed217fe46fe6acb96f2273c0b39056840078c05ab2
|
4
|
+
data.tar.gz: b62705e1adc08bc4bb7b574d59be327a70730ad39d37a3cc4b79bb353bf29290
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2955d3f05418ff24546990326dae9229af1772cb7b83642b824a2dd2b9463d61abd08d720083f012d287bad3ac524f53bcc4f1fbc4a8f634a5c38435bec3c884
|
7
|
+
data.tar.gz: 13c8e6a49ecb6bfb03ed67066d8ffc5d5a86248aa68ba46cd8a0b9ad24232e6d91bec45c2bc26cee73b28d2fe8aedf7ee83302afb1925e54a36ec6e5a24e933e
|
data/lib/parser/source/buffer.rb
CHANGED
@@ -94,15 +94,16 @@ module Parser
|
|
94
94
|
#
|
95
95
|
def self.reencode_string(input)
|
96
96
|
original_encoding = input.encoding
|
97
|
-
|
98
|
-
detected_encoding = recognize_encoding(dup_input.force_encoding(Encoding::BINARY))
|
97
|
+
detected_encoding = recognize_encoding(input.force_encoding(Encoding::BINARY))
|
99
98
|
|
100
99
|
if detected_encoding.nil?
|
101
|
-
|
100
|
+
input.force_encoding(original_encoding)
|
102
101
|
elsif detected_encoding == Encoding::BINARY
|
103
102
|
input
|
104
103
|
else
|
105
|
-
|
104
|
+
input.
|
105
|
+
force_encoding(detected_encoding).
|
106
|
+
encode(Encoding::UTF_8)
|
106
107
|
end
|
107
108
|
end
|
108
109
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- whitequark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-08 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.2/CHANGELOG.md
|
255
|
+
documentation_uri: https://www.rubydoc.info/gems/parser/3.3.4.2
|
256
|
+
source_code_uri: https://github.com/whitequark/parser/tree/v3.3.4.2
|
257
257
|
post_install_message:
|
258
258
|
rdoc_options: []
|
259
259
|
require_paths:
|