unparser 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/unparser/writer/dynamic_string.rb +7 -3
- 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: 5edf8f2731473b62649c92936d8c04ff8a19e598bdc9811feb332d8cd3cff58f
|
4
|
+
data.tar.gz: 8e47978900270932616a7c7b1a8869442d0d0e64c90a6147b7bd6d0938edea44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5966f2f944ee5f596a3919d9c6d6b1ce1406ba4ab015b39d220941f35c4c5e5aeb401c270dab0b60883bd8b5fb3379d7dafe28be657a4af9fa4045be784a6f4
|
7
|
+
data.tar.gz: 837b201d4d4ea307cbdc50d04640957618f6ccec1e7d5782b5b3654901369d80f02425d5c4a9b61cb1f90fb87d14146fff4889b7b1d49039369d58fdc33aa7d8
|
@@ -46,7 +46,7 @@ module Unparser
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def heredoc?
|
49
|
-
children.empty?
|
49
|
+
!children.empty? && (nl_last_child? && heredoc_pattern?)
|
50
50
|
end
|
51
51
|
|
52
52
|
def emit_heredoc_header
|
@@ -169,8 +169,12 @@ module Unparser
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def emit_dstr
|
172
|
-
|
173
|
-
|
172
|
+
if children.empty?
|
173
|
+
write('%()')
|
174
|
+
else
|
175
|
+
segments.each_with_index do |children, index|
|
176
|
+
emit_segment(children, index)
|
177
|
+
end
|
174
178
|
end
|
175
179
|
end
|
176
180
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unparser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: '0'
|
349
349
|
requirements: []
|
350
|
-
rubygems_version: 3.
|
350
|
+
rubygems_version: 3.1.4
|
351
351
|
signing_key:
|
352
352
|
specification_version: 4
|
353
353
|
summary: Generate equivalent source for parser gem AST nodes
|