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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c513c025d3466aaa344468699cb2b737a4d85ba3275b8702fe8cd7194e0fe74
4
- data.tar.gz: 26b706425f418a7dbdb4063f7cd082e22633deb035c4444ca01dfe28c1a5c3d6
3
+ metadata.gz: 343568dc3db7c4cb37b68cdef2a241b86e639fea958156014ab0b701b0d04426
4
+ data.tar.gz: 320c9f744d2ae76c16efb8e70f021ae35faa8bc89251ff211690085cdf7f2fe3
5
5
  SHA512:
6
- metadata.gz: a9743ae26ad02e463e5592cd53f0f6e2ab95ced23f687468fbd58df249971be181b7b69edafc69ca65e7a98048205940c0108aff96ceb7984c9220439e9e6d7f
7
- data.tar.gz: 17afaecd6b1d3af320d62b570ccce3ebfb109ed845fc78059fd69a8561fe90630d01470f401370913a7ffc5e298f862580f7c302617432059d1afb8dd6ea13bc
6
+ metadata.gz: dc4f82ed4f56061e57952b794f44d039d456bf43b2e805020233e20569908ce95e788520b2642c33bc2838860a80fe5308959fc3c994bcbc48739ca1ca3aed6a
7
+ data.tar.gz: 4b4cc6603bef9ca16925bcb009d0b1ed17c3fb22125a0c2b8eb2ea6c631664cea26e466aa7bacbff9b73040a37341cc107f678edc5f81c22745086b011b46b6a
@@ -1,9 +1,15 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- Not released (2019-12-26)
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
- lines = string.split("\\\n")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- VERSION = '2.7.0.0'
4
+ VERSION = '2.7.0.1'
5
5
  end
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.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-26 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast