parser 2.7.0.0 → 2.7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/parser/lexer/dedenter.rb +5 -1
- data/lib/parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 343568dc3db7c4cb37b68cdef2a241b86e639fea958156014ab0b701b0d04426
|
4
|
+
data.tar.gz: 320c9f744d2ae76c16efb8e70f021ae35faa8bc89251ff211690085cdf7f2fe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc4f82ed4f56061e57952b794f44d039d456bf43b2e805020233e20569908ce95e788520b2642c33bc2838860a80fe5308959fc3c994bcbc48739ca1ca3aed6a
|
7
|
+
data.tar.gz: 4b4cc6603bef9ca16925bcb009d0b1ed17c3fb22125a0c2b8eb2ea6c631664cea26e466aa7bacbff9b73040a37341cc107f678edc5f81c22745086b011b46b6a
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
-
Not released (2019-12-
|
4
|
+
Not released (2019-12-30)
|
5
5
|
-------------------------
|
6
6
|
|
7
|
+
Bugs fixed:
|
8
|
+
* dedenter.rb: prevent `ArgumentError` when processing binary en… (#642) (Koichi ITO)
|
9
|
+
|
10
|
+
v2.7.0.0 (2019-12-26)
|
11
|
+
---------------------
|
12
|
+
|
7
13
|
API modifications:
|
8
14
|
* README.md: documented compatibility issue with EOF chars after… (#637) (Ilya Bylich)
|
9
15
|
* ruby27.y: refactor logic around 'circular argument reference'(#628) (Ilya Bylich)
|
@@ -34,7 +34,11 @@ module Parser
|
|
34
34
|
# Of course, lexer could do it but once again: it's all because of dedenting.
|
35
35
|
#
|
36
36
|
def dedent(string)
|
37
|
-
|
37
|
+
original_encoding = string.encoding
|
38
|
+
# Prevent the following error when processing binary encoded source.
|
39
|
+
# "\xC0".split # => ArgumentError (invalid byte sequence in UTF-8)
|
40
|
+
lines = string.force_encoding(Encoding::BINARY).split("\\\n")
|
41
|
+
lines.map! {|s| s.force_encoding(original_encoding) }
|
38
42
|
|
39
43
|
if @at_line_begin
|
40
44
|
lines_to_dedent = lines
|
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: 2.7.0.
|
4
|
+
version: 2.7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- whitequark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|